Forum


Replies: 1   Views: 246
Issue converting pdf file to docx
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 ascendware  · 06-05-2020 - 08:11

Hi,

I'm using this script (https://www.phpdocx.com/documentation/cookbook/convert-pdf-to-docx) to convert a PDF to a DOCX file format. However, it is throwing a "Class 'VARIANT' not found" error. Can you help me with this error?

Also, can the CreateDocxFromTemplate class accept a PDF file as a source template?

 

Thank you very much.

Posted by admin  · 06-05-2020 - 09:02

Hello,

PDF to DOCX is available only using the conversion plugin based on msword. This conversion plugin requires a Windows server (https://www.phpdocx.com/documentation/conversion-plugin/information), PHP COM, and MS Word. The Variant class is included in PHP COM: https://www.php.net/manual/en/class.variant.php. To use this conversion plugin method please check that all requirements are installed.

CreateDocxFromTemplate is only compatible with DOCX documents.

Regards.