Subject: | corrupted PDF generated |
Date: | Mon, 23 Dec 2019 20:23:27 +0100 |
To: | bug-PDF-API2 [...] rt.cpan.org |
From: | welle ozean <welleozean [...] googlemail.com> |
On Windows 10 running the latest PDF::API2 generates corrupted files:
use strict;
use warnings;
use PDF::API2;
use PDF::API2::Annotation;
use PDF::API2::Basic::PDF::Utils;
my $pdf = PDF::API2->open('C:\\Users\\WC\\Desktop\\original.pdf');
my $page = $pdf->openpage(1);
my $sticky = $page-> annotation;
$sticky-> text( 'Text in pop-up window',
-rect => [ 100, 500, 100, 500 ], -open => 1 );
$sticky-> { C } = PDFArray( map PDFNum( $_ ), 1, 0.65, 0 );
$pdf->saveas( 'C:\\Users\\WC\\Desktop\\target.pdf' );
For what it matters, also simply opening the file and saveas without any
operation in between generates a corrupted file. With corrupt I mean the
latest Adobe reader is not able to open it (Error 14)