RE: Transpose two pages

"Mark Fowle" <mfowle-uVnJ9s0aRV+BUy7/[email protected]> Thu, 1 May 2008 09:05:51 -0400
Newsgroups gmane.comp.lang.perl.modules.pdfapi2
Message-ID <[email protected]>
I think internally you need to work with two handles orig and new.
The logic would be something like:

Open pdfOrig
New pdf pdfNew
pdfNewpage1 = pdfOrigsecondlast page
pdfNewpage2 = pdfOriglast page
forevery other page in odfOrig
  copy to pdfNew
close pdfOrig
pdfNew saveas name of pdfOrig 


Pre coffee logic looks like poo, but should be a starting point for you.


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Rick Measham
Sent: Wednesday, April 30, 2008 8:23 PM
To: [email protected]
Subject: [perl-text-pdf-modules] Transpose two pages

Given a $pdf object, is there any way to move two pages from the end to 
the front?

$pdf->importpage( $pdf, -1, 1 );

results in an error:
page not processed via openpage ...  at 
/usr/lib/perl5/site_perl/5.8.5/PDF/API2.pm line 1256.

Cheers!
Rick Measham