Slice and Dice PDF
March 24th, 2009 by Janos Gyerik in
Using poppler-tools and psutils, you can extract a range of pages from a larger PDF file. For example, if you want to extract pages 11–14 of the PDF file afile.pdf, you could use the following command:
$ pdftops afile.pdf - | psselect -p11-14 | ps2pdf - file-p11-14.pdf
The pdftops command converts the PDF file to PostScript; the psselect command selects the relevant pages from the PostScript, and the ps2pdf command converts the selected PostScript into a new PDF file.
__________________________
Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer
Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.
Subscribe now!
The Latest
Newsletter
Tech Tip Videos
- Nov-19-09
- Nov-04-09
Recently Popular
From the Magazine
December 2009, #188
If last month's Infrastrucuture issue was too "big" for you then try on this month's Embedded issue. Find out how to use Player for programming mobile robots, build a humidity controller for your root cellar, find out how to reduce the boot time of your embedded system, and if you're new to embedded systems find out the basics that go into one. You can also read about the Beagle Board, the Mesh Potato and a spate of other interestingly named items. And along with our regular columns don't miss our new monthly column: Economy Size Geek.
Delicious
Digg
StumbleUpon
Reddit
Facebook








looking for similar
On April 2nd, 2009 Anonymous (not verified) says:
This and comments give me things to investigate tomorrow, but I have been looking for something that simply combines pdfs or images into one pdf.
Whitening System
On March 28th, 2009 Whitening System (not verified) says:
Poppler-tools and psutils if actually can command over the PDF file then great…!
Seriously I agree using
On March 27th, 2009 Dentist Melbourne (not verified) says:
Seriously I agree using poppler-tools and psutils, you can extract a range of pages from a larger PDF file.
bmx bikes
On March 27th, 2009 bmx bikes (not verified) says:
I found this option really of good use and great significance
pdftk is better
On March 24th, 2009 Tig (not verified) says:
I like to use pdftk for such things. The above line translates to:
"pdftk A=afile.pdf cat A11-14 output file-p11-14.pdf"
No converting to and from postscript.
There is another option
On March 24th, 2009 Stavros Christoforou (not verified) says:
You could use pdftk, which does everything without the need for conversion to/from ps.
Post new comment