Forum


Replies: 2   Views: 1645
Change mime content-type
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by LucasSpl  · 09-03-2021 - 08:46

Hello,

This simple script

$docx = new CreateDocx();

$docx->embedHTML('<h2 style="text-align: center;">test</h2>');

$path = DIR_TMP . getUniqId();
$docx->createDocx($path);

$path .= ".docx";

var_dump(mime_content_type($path));

 Return

string(24) "application/octet-stream"

I am using a pdf converter which is strict on the content type, and it refuses application/octet-stream.
Is it possible to get application/vnd.openxmlformats-officedocument.wordprocessingml.document ?

Regards