Forum


Replies: 5   Views: 6692
Pdf conversion
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 admin  · 10-04-2017 - 18:27

Hello,

We see in your script these lines:

use Phpdocx\Transform\TransformDocAdvOpenOffice;

$docx = new TransformDocAdvOpenOffice();

This script is not using the conversion plugin based on LibreOffice but the one based on OpenOffice.
As you can read on https://www.phpdocx.com/documentation/conversion-plugin/running-the-first-example-and-available-options, to use LibreOffice you need to use the TransformDocAdvLibreOffice class:

use Phpdocx\Transform\TransformDocAdvLibreOffice;

$docx = new TransformDocAdvLibreOffice();

or the transformDocument method to autodetect the conversion plugin automatically from the data of the config file.

After you have set the options in config/phpdocxconfig.ini, please try to run the included sample FormatConversion/transformDocument/sample_1.php using PHP CLI mode:

$ php sample_1.php

It must generate the PDF fine. 

If you send to contact[at]phpdocx.com SSH access to your server a member of the dev team can check it directly. We'd need SSH access, the path where phpdocx is installed and an URL to test it using a web browser.

Regards.