This queue is for tickets about the PDF-API2 CPAN distribution.

Report information
The Basics
Id:
118100
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
gortan [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
2.026
Fixed in:
2.029



Subject: importpage results in endless recursion (cross-reference-related?)
The attached single-page PDF (which seems to be correct, as far as I can tell) results in an endless recursion when calling import_page with PDF::API2 version 2.028. With version 2.025 I get the message that cross-reference files are not supported, so the issue might be cross-reference-related. I attached a minimal script to reproduce the issue (it's basically just calling import_page). The stack trace might show the cause of the issue: ... PDF::API2::Basic::PDF::File::read_objnum(ref(PDF::API2::Basic::PDF::File), undef, 0) PDF::API2::Basic::PDF::File::read_objnum(ref(PDF::API2::Basic::PDF::File), undef, 0) PDF::API2::Basic::PDF::File::read_objnum(ref(PDF::API2::Basic::PDF::File), undef, undef) PDF::API2::Basic::PDF::File::read_obj(ref(PDF::API2::Basic::PDF::File), ref(PDF::API2::Basic::PDF::Array)) PDF::API2::Basic::PDF::Objind::realise(ref(PDF::API2::Basic::PDF::Array)) PDF::API2::importPageIntoForm(ref(PDF::API2), ref(PDF::API2), ref(PDF::API2::Page)) PDF::API2::import_page(ref(PDF::API2), ref(PDF::API2), 1) Note that read_obj calls read_objnum with an undefined $num, which results in the endless recursion. I guess at least read_objnum should return if called this way, so the endless recursion would not occur. Whether further things need to be fixed is beyond my insight... Thanks for checking..!
Subject: iPad_PDF_10.pdf

Message body not shown because it is not plain text.

Subject: test.pl
#! /usr/bin/env perl use PDF::API2; use strict; use warnings; my $filename = shift or die "Usage: $0 <file.pdf>\n"; my $pdf = PDF::API2->open($filename); my $out = PDF::API2->new(); my $out_page = $out->import_page( $pdf, 1 );
This is due to the same bug as RT #113293, which was just patched. The fix will be in the next release (2.029).
On Thu Oct 06 23:23:34 2016, SSIMMS wrote:
Show quoted text
> This is due to the same bug as RT #113293, which was just patched.
Yep, I can confirm that this bugfix solves my problem - now that is a nasty language "feature"! Thanks a lot!


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.