Forum


Replies: 1   Views: 3446
Any tips to speed up libreoffice 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 bbreukelen  · 04-07-2016 - 10:29

I finally managed to get good performance on my docx creation (7-10 pages).
It all generates within 2 seconds now.

Then I create a PDF out of it using LibreOffice.
This process takes 8-10 seconds and maxes out the server's CPU during the process.

Are there any command-line settings I can do like tweaking compression etc to speed things up?
Thanks

 

Posted by admin  · 05-07-2016 - 07:48

Hello,

The conversion plugin transforms a document of 10 pages in about one second but this time may vary if the document has a lot of images and the server specs.

For example, this is the time that takes the document of 10 pages you sent to our contact email on one of our test servers:

real    0m2.105s
user    0m1.876s
sys    0m0.084s

There's no option to enable any kind of compression before doing the conversion.

One test you could try, as you're working with more than one DOCX and then you merge them to a single DOCX, is to transform each DOCX separately to PDF and merge the output using mergePDF method (http://www.phpdocx.com/api-documentation/docxutilities/merge-pdf-documents-with-PHP).

Regards.