Forum


Replies: 4   Views: 345
Simultaneous pdf creation?
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 meyerandassoc  · 02-05-2024 - 13:53

Hi,

We had two of our users submit a request for a PDF document to be created a few seconds apart. This was not intentional; just a timing issue. The result was that the first requested PDF was created, but the second requested PDF was not created.

The only errors in the logs were associated to the PDF file not being found.

FAIL::2::185::.\phpdocx\classes\TransformDocAdvLibreOffice.php::rename(.\temp\Account 987654321 Update - 1714522260.pdf,.\temp\Account 987654321 Update - 1714522260.pdf): The system cannot find the file specified (code: 2)

Is this a known issue/limitation, or did we just run into an annomoly?

The order things transpired is:

  • 1st requested Word document was completed.
  • Call to the 1st requested PDF started.
  • 2nd requeted Word document was completed.
  • Call to the 2nd requested PDF started.
  • 1st requested PDF was completed. (this took about 8 seconds)
  • 2nd requested PDF was never created.  

 

We are running PhpDocx 14.5 Advanced on Windows/IIS/PHP 8, and using LibreOffice as the executable to create the PDFs.

Our process uses a Word template. Our code creates a Word document using the Word tempalte, then creates a PDF using the Word document.

$docx->createDocx($WordFileName);
$docx->transformDocument($WordFileName, $PDFFileName);