Subject: | Updates to PDF 1.5+ files with cross reference stream are not rendering in Acrobat Reader |
As reported in https://www.perlmonks.org/?node_id=1233444.
This is still a problem latest PDF::API2 blead. I have to do a bit more work to tickle it (e.g. adding a page) because the latest PDF::API2 now guards against null updates.
use PDF::API2;
my $pdf = PDF::API2->open("/tmp/test.pdf") or die $@;
my $page = $pdf->page;
my $font = $pdf->corefont('Helvetica-Bold');
$text = $page->text();
$text->font($font, 20);
$text->translate(200, 700);
$text->text('Test!');
$pdf->saveas("/tmp/test2.pdf");
With the attached test.pdf (for example), the output test2.pdf will fail in Adobe reader with "There was a problem reading this document (14)."
Subject: | test.pdf |
Message body not shown because it is not plain text.