Forum


Replies: 1   Views: 966
Docx->pdf conversion using ms word conversion plugin
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 daveiroquois  · 03-03-2022 - 15:01

We are trying to convert a Docx to PDF. Per your site's instructions, we installed Word on the server. We then ran this code:

$docx = new TransformDocAdvMSWord();
$docx->transformDocument("../../../resources/templates/GoodEnough1.docx", "../../../resources/templates/GoodEnough1.pdf");

And we get this error:

Fatal error: Uncaught com_exception: Failed to create COM object `word.application': Access is denied. in D:\Websites\Folder\ServiceRequestsAdmin\classes\phpdocx\v12.5\classes\TransformDocAdvMSWord.php:105 

We've also given all the proper access rights per the instructions listed on your website:

MS Word common problems and issues
  • Error using the active document: if the transformation returns an error related to unable to open the DOCX, the msword method allows to choose documents or active as selected content. The default value is active, if it fails documents must be chosen.
  • dcom config should be configured to allow "interactive user", "remote access" and "remote action", as well as adding the "IUSR" account.
  • Source and target files must use absolute paths and double backslashes: 'C:\\folder\\source.docx' .

 

Please advise, thank you.