Thursday, April 21 2005 @ 08:22 AM PDT
Contributed by: Anonymous
Views: 11,279
I would like to split a large pdf file into several small files based on the account no on the page and would be able to give custom file name to each pdf. This I would like to do it in a batch job in solaris. How can I do it.
Any help is greatly appreciated.
I suggest using pdftotext to extract your PDF's text. run pdftotext --help to see its options. Its output uses the the formfeed (0x0C) character to show page breaks. Scan the output from pdftotext for the account number, or possibly some other distinctive feature, to find where to split the PDF. Count pages as you go along by counting formfeeds. Then create a pdftk command-line to perform the split and output the new file to your custom file name. Script using bash, if you like.