Skip Menu |
 

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

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

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

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: page not processed by openpage()
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 219
Download (untitled) / with headers
text/plain 219b
The below script issues an error "page not processed by openpage"; not sure if this is a docs issue or a functional defect. use PDF::API2; $pdf1 = PDF::API2->new; $pdf1->page; PDF::API2->new->importpage( $pdf1, 1 );
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-23317-1178777775-652.27033-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 58
ROTFLMHO write a real script and you dont get this error.
MIME-Version: 1.0
X-Spam-Status: No, hits=-1.9 required=8.0 tests=BAYES_00,DKIM_POLICY_SIGNSOME,DK_POLICY_SIGNSOME,SPF_NEUTRAL
In-Reply-To: <rt-3.6.HEAD-23317-1178777775-652.27033-6-0 [...] rt.cpan.org>
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-27033 [...] rt.cpan.org> <rt-3.6.HEAD-23317-1178777775-652.27033-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: windows-1252
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 6E84B4D801A for <bug-PDF-API2 [...] rt.cpan.org>; Thu, 10 May 2007 05:50:04 -0400 (EDT)
Received: (qmail 27267 invoked by alias); 10 May 2007 09:50:03 -0000
Received: from vms040pub.verizon.net (HELO vms040pub.verizon.net) (206.46.252.40) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 10 May 2007 02:47:49 -0700
Received: from [192.168.2.36] ([141.151.161.212]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JHT002TXKJGE50C [...] vms040.mailsrvcs.net> for bug-PDF-API2 [...] rt.cpan.org; Thu, 10 May 2007 04:47:41 -0500 (CDT)
Delivered-To: cpan-bug+pdf-api2 [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #27033] page not processed by openpage()
User-Agent: Thunderbird 2.0.0.0 (Windows/20070326)
Return-Path: <barries [...] slaysys.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-PDF-API2 [...] rt.cpan.org
Date: Thu, 10 May 2007 05:47:51 -0400
Message-Id: <4642EA47.5030707 [...] slaysys.com>
To: bug-PDF-API2 [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Barrie Slaymaker <barries [...] slaysys.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-23294-1178790610-825.27033-0-0 [...] rt.cpan.org>
Content-Length: 454
Download (untitled) / with headers
text/plain 454b
That script is as "real" as any short-as-possible reproduction is. This is a problem I bumped in to when trying to work around issue #27035 by copying pages from one PDF to another and creating the new ("inserted") page at the right point in the copy. From your response, it sounds like this is not a supported operation, yet that use of importpage() seems to be compatible with the documentation, so I'm curious as to what makes it unsupported?
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-23317-1178837266-1734.27033-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 178
Download (untitled) / with headers
text/plain 178b
to rectfy this: you can only import a page that has 'content'. in your 'script' the page has no content hence the import operation is not supported and entirely unreasonable.
MIME-Version: 1.0
X-Spam-Status: No, hits=-1.9 required=8.0 tests=BAYES_00,DKIM_POLICY_SIGNSOME,DK_POLICY_SIGNSOME,SPF_NEUTRAL
In-Reply-To: <rt-3.6.HEAD-23317-1178837266-1734.27033-6-0 [...] rt.cpan.org>
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-27033 [...] rt.cpan.org> <rt-3.6.HEAD-23317-1178837266-1734.27033-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id C64544D80EB for <bug-PDF-API2 [...] rt.cpan.org>; Thu, 10 May 2007 19:29:07 -0400 (EDT)
Received: (qmail 25668 invoked by alias); 10 May 2007 23:29:06 -0000
Received: from vms048pub.verizon.net (HELO vms048pub.verizon.net) (206.46.252.48) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 10 May 2007 16:28:59 -0700
Received: from [192.168.1.104] ([71.253.15.112]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JHU009QKMJZYONA [...] vms048.mailsrvcs.net> for bug-PDF-API2 [...] rt.cpan.org; Thu, 10 May 2007 18:28:48 -0500 (CDT)
Delivered-To: cpan-bug+pdf-api2 [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #27033] page not processed by openpage()
User-Agent: Thunderbird 2.0.0.0 (Windows/20070326)
Return-Path: <barries [...] slaysys.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-PDF-API2 [...] rt.cpan.org
Date: Thu, 10 May 2007 19:29:00 -0400
Message-Id: <4643AABC.2000801 [...] slaysys.com>
To: bug-PDF-API2 [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Barrie Slaymaker <barries [...] slaysys.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-23317-1178839754-144.27033-0-0 [...] rt.cpan.org>
Content-Length: 613
Download (untitled) / with headers
text/plain 613b
Show quoted text
> you can only import a page that has 'content'...[so] the import
operation is not supported and entirely unreasonable. Perhaps that should be mentioned in the docs as I can see leaving a page intentionally blank. Anyhoo, here's one with content that also fails, however uncommenting the saveas() & open() works around the issue. use PDF::API2; $pdf1 = PDF::API2->new; $t = $pdf1->page->text; $t->font( $pdf1->corefont('Times-Roman'), 10 ); $t->translate( 20, 20 ); $t->text( $pdf1->pages ); #$pdf1->saveas( "foo.pdf" ); #$pdf1 = PDF::API2->open( "foo.pdf" ); PDF::API2->new->importpage( $pdf1, 1 );
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-23323-1178840392-109.27033-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 91
i have corrected the documentation in CVS that importing is only possible with onfile pdfs.


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.