Task #1043
Unable to open saved PDF in Acrobat Reader
0%
Description
Hi,
I am using TCPDF Advanced Table.
I create a simple PDF with a header and footer. Its working good and I am able to view the PDF in browser (Chrome). I downloaded the PDF and unable to open it in Acrobat. I get an error as "There was an error opening this document. The file is damaged and could not be repaired"
Then I ran the example (tcpdf_table\example-table-2-overview.php) that you have given in the bundle. I get the same problem with this also. Able to see in browser but not able to ope in Acrobat reader.
Then, this same example (Pdf example #2:) is hosted in your website (http://www.interpid.eu/tcpdf-table), exactly the same code, it works good. I am able to download it and open in Acrobat Reader.
Instead of streaming to browser, I saved it in disk. Then also the same issue repeats.
If your example tcpdf_table\example-table-2-overview.php works for me, then I can port it to my code. Do I need to make any changes to it?
I have spent significant amount of time on this. Please help me.
Regards,
Joseph.
Files
Updated by Andrei Bintintan over 7 years ago
- Status changed from New to In Progress
- Assignee set to Joseph Kulandai
This is strange, I can reproduce it. I will investigate.
Updated by Andrei Bintintan over 7 years ago
- File Screenshot_98.png Screenshot_98.png added
- Status changed from In Progress to Feedback
Resolution: Please delete the _putinfo() function from the classes/pdf.php file.
This function is used by unit-tests, but it seems indeed to break the pdf. I'll review and release a fix.
Please let me know if it fixed your issue.
Updated by Andrei Bintintan over 7 years ago
Or replace it with:
protected function _putinfo()
{
if ( defined( 'ENVIRONMENT' ) && 'test' == ENVIRONMENT ) {
$this->file_id = '1234567890';
$this->tcpdf_version = "1.0.0";
}
return parent::_putinfo(); }
Updated by Andrei Bintintan over 7 years ago
Changes released, please make an update. http://www.interpid.eu/download