Forum


Replies: 1   Views: 254
When trying open generated .docx file show error messages.
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 fairshareitservices  · 03-05-2024 - 07:04

Hello,

We are generating documents using - 

$templateDocx = new CreateDocxFromTemplate("$INPUT_DIRECTORY/$templateFileName");
$templateVariablesArray = $templateDocx->getTemplateVariables();
<---Some line of Code----->
$templateDocx->createDocx($outputFileName);

Documents generate successfully but out of bulk documents, few docx files are getting messages while trying to open in Word.

Below are the Messages -

1.We're sorry. We can't open '***file_name***.docx' because we found a problem with its content. 

When I click on 'Ok' It shows a second message ---

2. Word found unreadable content in '***file_name***.docx'. Do you want to recover the contents of this document? If you trust the source of this document, click Yes.

When I click on Yes I can see the contents but the file name get changed to 'Document1'.

What is the issue for some specific files out of bulk files generated using the library function?

Thank You.