Skip Menu |
 

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

Report information
The Basics
Id: 12449
Status: resolved
Priority: 0/
Queue: PDF-API2

People
Owner: Nobody in particular
Requestors: djacopille [...] mfs.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.41
Fixed in: (no value)



Subject: -1 used in importpage()
Download (untitled) / with headers
text/plain 901b
Error: Modification of non-creatable array value attempted, subscript -1 at /Library/Perl/5.8.1/PDF/API2.pm line 810. Appears to be a problem appending a page to end of document when document is new and does not contain any pages yet. Using "1" instead of "-1" for first page avoids this problem. Subsequent pages can be added using "-1". perl -v: This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level OS X version 10.3.8 $Id: API2.pm,v 1.79 2005/03/23 16:42:06 fredo Exp $ Modules built via sudo perl -MCPAN -eshell Thank you for building this incredible toolset! Sample code: #!/usr/bin/perl use warnings; use strict; use PDF::API2; my $pdf = PDF::API2->new(-file => "/Users/djac/Desktop/output.pdf"); my $pdf1 = PDF::API2->open("/Users/djac/Desktop/PDFInserts/mysql.pdf"); $pdf->importpage($pdf1, 1, -1); $pdf->importpage($pdf1, 2, -1); $pdf->save; $pdf->end; $pdf1->end; exit;
Download (untitled) / with headers
text/plain 531b
[guest - Thu Apr 28 11:07:45 2005]: Show quoted text
> Error: Modification of non-creatable array value attempted, subscript > -1 at /Library/Perl/5.8.1/PDF/API2.pm line 810. > > Appears to be a problem appending a page to end of document when > document is new and does not contain any pages yet. Using "1" > instead of "-1" for first page avoids this problem. Subsequent > pages can be added using "-1".
works as documented: "-1" inserts a page before the first page, fi you simply want to append just drop the last parameter.
closed because no comments


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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