Hi,
I'm using Prince with to generate PDF files. When I generate a single PDF file, no problem, it is perfectly generated. But when I try to generate successively several PDF files, only the first is generated...
When several PDF files need to be generated, the content differs only by the name of the recipient and its postal adress... and the XHTML code is correctly generated. But when I call Prince to convert it, only the first is converted.
I looked in my PHP code for many hours and I didn't find any explication... I've tried many methods :
- with the 3 convert methods of the PHP interface.
- with a direct call to Prince with the exec function.
- using exec to call a separated php script wich call Prince for each single PDF.
- ...
In all cases it's the same : the first file is OK, but there is nothing for the followings...
When I call :
Is there a Prince or PHP bug ? Does anybody already faced (and
ideally solved ) a similar problem ?
Thanks
I'm using Prince with to generate PDF files. When I generate a single PDF file, no problem, it is perfectly generated. But when I try to generate successively several PDF files, only the first is generated...
When several PDF files need to be generated, the content differs only by the name of the recipient and its postal adress... and the XHTML code is correctly generated. But when I call Prince to convert it, only the first is converted.
I looked in my PHP code for many hours and I didn't find any explication... I've tried many methods :
- with the 3 convert methods of the PHP interface.
- with a direct call to Prince with the exec function.
- using exec to call a separated php script wich call Prince for each single PDF.
- ...
In all cases it's the same : the first file is OK, but there is nothing for the followings...
When I call :
exec('/usr/bin/prince "/home/[...]/xhtmlSource" "/home/[...]/pdfDestination"', $results, $returnedValue);
In all case the $results array is empty. For the first call $returnedValue = 0 and for the following, $returnedValue = 1. Is there a Prince or PHP bug ? Does anybody already faced (and
ideally solved ) a similar problem ?
Thanks