[NTLUG:Discuss] Split a PDF File in Linux

Robert Citek robert.citek at gmail.com
Thu Apr 24 10:17:30 CDT 2008


On Thu, Apr 24, 2008 at 7:47 AM, Kipton Moravec <kip at kdream.com> wrote:
>  Got the package installed, thanks. Still something wrong.

FWIW, this didn't work for me, either:

$ wget 'http://www.irs.gov/pub/irs-pdf/p17.pdf'

$ pdf2ps p17.pdf | psselect -p1,2,3,4 | ps2pdf - > p17.p1-4.pdf

$ ls --si -l p17*.pdf
-rw-r--r-- 1 rwcitek rwcitek 2.2k 2008-04-24 09:36 p17.p1-4.pdf
-rw-r--r-- 1 rwcitek rwcitek 2.7M 2008-03-15 01:01 p17.pdf

However, when I veiw p17.p1-4.pdf, there's nothing but one blank page,
and that was after a good 10 minutes of processing.

On the other hand, pdfedit worked, although somewhat clumsily:
highlight the pages you don't want in the document tree, press delete,
save.  Open saved document and repeat for any other pages you don't
want.  You have to save between each delete because pdfedit doesn't
update the document tree properly after the delete.

To it's credit pkdtk worked great and worked quickly (<20s), although
the commandline options verge on its own language:

$ pdftk p17.pdf cat 1-4 output p17.p1-4.pdf

where:

  p17.pdf == the input file
  cat 1-4 == get pages 1-4
  output p17.p1-4.pdf  == output to file p17.p1-4.pdf

Regards,
- Robert



More information about the Discuss mailing list