[dba-Tech] Split multi-page PDF file into single pages

Gustav Brock Gustav at cactus.dk
Fri Sep 11 16:49:13 CDT 2009


Hi Arthur

Combining is called merge and is invoked by a cat command:

Merge Two or More PDFs into a New Document
  pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
or (Using Handles):
  pdftk A=1.pdf B=2.pdf cat A B output 12.pdf
or (Using Wildcards):
  pdftk *.pdf cat output combined.pdf

I split the multi-page pdf into single files because it - for one month - contains all pay slips for an employer while (of course) individual pay slips should be e-mailed to each employee as an attached pdf file. Further, a small app (C# using XML as storage) extracts the pay slip info of the pdf files for archiving and controlling the distribution via e-mail. For this I use the ps2txt util:

  http://www.verydoc.com/ps-to-text.html

which without a license runs in demo mode which only will convert "a few pages". Thus I let it read only one page documents to play safe. It is a command line tool with no GUI.

/gustav


>>> fuller.artful at gmail.com 11-09-2009 18:13 >>>
Gustav,
I find this desire interesting since my problems have typically involved the
reverse: combine several PDFs into one. For that I use Attac Consulting's
PDF class stuff. But I have yet to need the ability to split a single PDF
into multiple one-page sends. This makes me curious. Why do you need to do
this?

A.

On Fri, Sep 11, 2009 at 11:11 AM, Gustav Brock <Gustav at cactus.dk> wrote:

> Hi all
>
> Found the method here at pdftk, PDF Tool Kit:
>
>  http://www.accesspdf.com/pdftk/ 
>
> Burst a Single PDF Document into Single Pages and Report its Data to doc_data.txt
>  pdftk multipage.pdf burst
>
> will produce a series of page files named pg_0001.pdf etc.
> And it runs fast as well.
>
> /gustav






More information about the dba-Tech mailing list