I am currently using the PDF::Extract module
I tried:
testing.pdf
Script:
use strict;
use PDF::Extract;
my $input = $ARGV[0];
my $newpdf = new PDF::Extract(PDFDoc => $input);
my $i = 1;
$i++ while ($newpdf->savePDFExtract(PDFPages => sprintf("%03d", $i)));
This script run successfully, but some page missing during the extraction.
2. points:
use strict;
use PDF::Extract;
my $input = $ARGV[0];
my $newpdf = new PDF::Extract(PDFDoc => $input);
my $i = 1;
$i++ while ($newpdf->savePDFExtract(PDFPages => $i));
This script runs successfully and all pages extract successfully, but I all page extracted and with sequences 001, 002, 003 etc.
For example:
testing001.pdf
testing002.pdf
testing003.pdf
…etc.
All pages also in this form without the missing page. How can I get this?
The
PDFPagesparameter ofsavePDFExtracttakes a list of page numbers. It isn’t designed to let you specify a custom file naming scheme. You can specify the name yourself instead, something like this: