Output Exception

Feb 15, 2016 at 1:19 PM
hi, i was trying to merge multiple pdfs generated by my script and i've found an exception thrown while writing the output.
Now the output file is looking good, it has all the pages from single files but i still get a fatal exception without any information on what's going wrong.
I worked around that by commenting line 124 of PDFMerger.php
throw new exception("Error outputting PDF to '$outputmode'.");
I know that is an AWFUL programming practice but i can't find a proper documentation for fpdi->Output() to test return values and i have deadlines so can't spend all the time debugging something that seems to work properly. Is there anyone who have a clue on how getting a "verbose" exception to get there and fix the issue properly?
Feb 15, 2016 at 1:37 PM
I've dug a little bit more and found an answer: the issue seems to be a logical bug in your project in PDFMerger.php near
if($fpdi->Output($outputpath, $mode))
                return true;
                throw new exception("Error outputting PDF to '$outputmode'.");
                return false;
You test the return values of fpdi->Output which according to some documentation i found is a void function, so it's always false and throws an Exception all the times.
I'm manually fixing it by removing/commenting the code but i suggest you to fix it in the main branch for everyone to get it working properly.

Waiting for feedback, hope to have been of some help.