Forum


Replies: 7   Views: 4288
Add blank page if odd page count
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 loktron  · 17-11-2016 - 06:44

I have the following problem:

I create a big number of letters and then merge them into a pdf file for printing. The merged pdf is then to be printed as duplex (both sites of the paper) The problem is, that if one letter has for example 3 pages (odd number in general), the next letter starts on the back side of the letter with an odd page count.

I now tried to getStatistics pagecount for every created letter before merging them and if it has an odd count, create a new document out of it, add a blank page and then save it again.

The problem is, the temp file is not created in the statistics function and i dont know why... I did it like in the example i Think.

I get the following error in my testfunction:


Warning: fopen(C:\inetpub\wwwroot\Dev\pdf\ziel\59.docx_txt582d513f8c431): failed to open stream: No such file or directory in C:\inetpub\wwwroot\Dev\phpdocx\classes\TransformDocAdvLibreOffice.inc on line 42
Unable to open stats file

I use windows server 2012

iis8

libreoffice 5

; libreoffice installation path, absolute path
path = "C:\Program Files(x86)\LibreOffice5"

Or is there maybe an easier way to do what i try to do?