NAME

PDF::Burst - create one pdf doc for each page in existing pdf document

DESCRIPTION

Bursting a pdf means if you have a pdf doc with 10 pages, you want to have 10 docs, each representing one page.

I just need to burst a pdf into many, so here is the module.

pdftk

I was using the excellent pdftk, but the present version will not compile with the new gcc compiler. I get a missing libgcj.so.7rh error. Can only install libgcj.so.8rh on fc8 so far.

PDF::API2 vs. CAM::PDF

There are two options for bursting. CAM::PDF, slower but apparently more stable. And PDF::API2, quicker but not supported on all architectures.

SYNOPSIS

 use PDF::Burst ':all';

 my $abs_pdf = '/home/myself/file.pdf';

 my @new_filenames = pdf_burst($abs_pdf);
 # we get 
 #     /home/myself/file_page_0001.pdf, 
 #     /home/myself/file_page_0002.pdf, 
 #     ..


 my $abs_pdf = '/home/myself/ogre.pdf';

 my @new_filenames = pdf_burst($abs_pdf, 'hi' );
 # we get 
 #     /home/myself/hi_page_0001.pdf, 
 #     /home/myself/hi_page_0002.pdf, 
 #     ..

 my @new_filenames = pdf_burst($abs_pdf, 'hi', '/home/stuff' );
 # we get 
 #     /home/stuff/hi_page_0001.pdf, 
 #     /home/stuff/hi_page_0002.pdf, 
 #     ..

SUBROUTINES

None are exported by default.

pdf_burst()

Argument is abs path to pdf document to split up. Original is unchanged. Optional arguments are the 'groupname', and the abs location (dir) you want to output the files to.

Any individual page files pre existing are written over.

Returns array list of abs paths to the files created.

pdf_burst_CAM_PDF()

Same as pdf_burst. Used by default.

pdf_burst_PDF_API2()

Same as pdf_burst.

DEBUG

To turn on debug..

$PDF::Burst::DEBUG = 1;

BUGS

Please contact the AUTHOR.

CAVEATS

pdftk is wonderful. If it doesn't work, use this. PDF::API2 2.015 will not properly split up docs on some architectures.

AUTHOR

Leo Charre leocharre at cpan dot org

SEE ALSO

PDF::API2 CAM::PDF pdftk