Open drtothferenc19 opened 6 years ago
I am having this exact same issue. There is something about these software-generated Invoices that is breaking tcpdf. The PDF says it was produced by "PDFlib+PDI 9.0.4 (PHP5/Win32)". When the server tries to perform the merge I can see the worker process's memory usage continuously increase until it reaches PHP's configured memory limit. Once the limit is reached an error is returned indicated the memory has been exhausted. I have tried to debug by removing the limit (memory_limit = -1) but then the process just grows and grows until all memory is consumed. We've used this code for many years and are now all of a sudden having these issues. Seems like whatever is generating these Invoices is used by a lot of people and was updated in the 2nd half of 2017.
How can I get additional debug information?
I want to merge several PDF documents, all of them contain one page. It takes 1-2 seconds for ~20 files which is great. There is one exception: when I want to merge invoices which are issued by an online billing software. Even if I want to merge two files only, I get timeout error Fatal error: Maximum execution time of 120 seconds exceeded in .../PDFMerger/tcpdf/tcpdi_parser.php on line 725 The line number is different at every running. The size of the PDF file is around 100kb but PDFMerger can easily merge much bigger files when I need it. When I modify the PDF files (e.g. compress) PDFMerger can merge them. Merging the original files by different online services is also working.
Any suggestion?