jmlynesjr has asked for the wisdom of the Perl Monks concerning the following question:
This falls into the "There are no five minute jobs" category. This should have been easy...
I have a 9 page PDF file that I want to delete pages 1 and 9 or extract 2..8, often. Both extractPages() and deletePages() fails with the same error below. Any ideas? I also tried PDF::API2, but the install fails with a PadWalker install fail. Thanks for your assistance.
Test Code
#! /usr/bin/perl # Environment: Ubuntu 22.04LTS, Perl 5 version 34 subversion 0 use strict; use warnings; use CAM::PDF; my $pdf = CAM::PDF->new('DX.pdf'); my $np = $pdf->numPages(); print "Number of pages: $np\n"; $pdf->extractPages( 2..8 ); $pdf->cleanoutput('DXout.pdf');
Output and error message
Number of pages: 9 Expected identifier label: 15 % 1 /Parent 1 0 R /MediaBox [ 0 0 ...
James
There's never enough time to do it right, but always enough time to do it over...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CAM::PDF Error: Expected identifier label
by kcott (Archbishop) on Mar 24, 2023 at 23:04 UTC | |
by Anonymous Monk on Mar 24, 2023 at 23:24 UTC | |
by kcott (Archbishop) on Mar 24, 2023 at 23:59 UTC | |
Re: CAM::PDF Error: Expected identifier label
by LanX (Saint) on Mar 24, 2023 at 20:07 UTC | |
by pryrt (Abbot) on Mar 24, 2023 at 21:40 UTC | |
by LanX (Saint) on Mar 24, 2023 at 21:45 UTC | |
Re: CAM::PDF Error: Expected identifier label
by LanX (Saint) on Mar 24, 2023 at 19:32 UTC | |
Re: CAM::PDF Error: Expected identifier label
by Anonymous Monk on Mar 24, 2023 at 23:55 UTC | |
by Anonymous Monk on May 15, 2023 at 09:55 UTC |
Back to
Seekers of Perl Wisdom