There are no forum posts on this topic! Why don't you write one?
We create docx documents with the following function:
require('grabzit/lib/GrabzItClient.class.php');
// require("grabzit/config.php");
$grabzIt = new GrabzItClient("...xxx...");
$grabzIt->HTMLtoDOCX("some content here");
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.$GLOBALS{TSFE}->id.'.docx"');
$GLOBALS['TSFE']->content = $grabzIt->SaveTo();
Documents are saved but when a docx is opened Word shows " error when opening the document ..."
What can be wrong?
Please can you go to this page: https://grabz.it/html-to-word-docx-api.aspx
Then create a capture with the HTML in the box and open the file.
Does the error occur?
Also it doesn't look like $GLOBALS['TSFE'] is being output into the response.
The example from the API page causes the same error. $GLOBALS['TSFE']->content outputs the content correctly into the saved docx so that the docx can be opened with wordpad correctly. Only MS Word causes this error.
you can try it here https://www.liesegang-partner.de/print/mustervertraege/unternehmenskauf/unternehmenskaufvertrag-share-deal-gmbh.html?doctype=word&attachment=1
What is the html you are converting? Maybe that is the issue.
see here as an example https://www.liesegang-partner.de/print/mustervertraege/unternehmenskauf/unternehmenskaufvertrag-share-deal-gmbh.html
We have identified what the issue is and will release a software fix soon.
The fix for this issue should be live in the next 30 minutes.