Subject: | Corrupted PDF produced by importPageIntoForm |
Date: | Wed, 23 Mar 2016 16:09:15 +0100 |
To: | bug-PDF-API2 [...] rt.cpan.org |
From: | Marco Pessotto <melmothx [...] gmail.com> |
Hi there!
It looks like I've hit a bug, but honestly I don't know where to start
looking.
Attached you can find two (apparently) identical PDFs, one produced by
xetex and one by luatex. When I import the one produced by luatex, the
second page get lost.
Evince just displays an empty page, while mupdf says:
error: stack overflow
warning: Ignoring errors during rendering
mupdf: warning: Errors found on page
Code to reproduce:
#!perl
use strict;
use warnings;
use PDF::API2;
for my $file (qw/xetex luatex/) {
my $in = PDF::API2->open("t/resources/$file.pdf");
my $out = PDF::API2->new;
my $page = $out->page;
my $gfx = $page->gfx;
for my $p (1, 2) {
if (my $included = $out->importPageIntoForm($in, $p)) {
print "Including $p\n";
$gfx->formimage($included, 100 * $p, 0)
}
}
$out->saveas("t/resources/$file.out.pdf");
$out->end;
$in->end;
}
Message body not shown because it is not plain text.
Message body not shown because it is not plain text.
Please let know if I can be of any help here.
Best wishes
--
Marco