#!/usr/local/bin/perl ########################################### # pdfextract # 2008, Mike Schilli ########################################### use strict; use warnings; use Getopt::Std; use Pod::Usage; use PDF::Extract; my($file, @pages) = @ARGV; if(! @pages) { pod2usage("Argument missing"); } my $pages = join " ", @pages; if(!-f $file) { pod2usage("PDF file doesn't exist: $file"); } my $pdf = PDF::Extract->new( PDFDoc => $file ); $pdf->savePDFExtract( PDFPages => $pages ); __END__ =head1 NAME pdfextract - Extract pages from PDF documents =head1 DOWNLOAD _SRC_HERE_ =head1 SYNOPSIS pdfextract file.pdf 41-42 =head1 DESCRIPTION pdfextract extracts pages from PDF documents and stores them as separate files. =head1 EXAMPLES $ pdfextract file.pdf 7 $ pdfextract file.pdf 7 41-42 =head1 LEGALESE Copyright 2008 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR 2008, Mike Schilli