DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: delete specific page range in a bunch of pdf files  (Read 3,269 times)

kalos

  • Member
  • Joined in 2006
  • **
  • Posts: 1,824
delete specific page range in a bunch of pdf files
« on: January 26, 2012, 02:01 PM »
hello!

I need to delete a specific range in a series of pdf files

any way to do that easily?

thanks!

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: delete specific page range in a bunch of pdf files
« Reply #1 on: January 26, 2012, 05:17 PM »
You can easily do this on the commandline with the PDF Toolkit (love this software).  Example:

Code
pdftk.exe A=test.pdf cat A1 A20-end output out.pdf
          ---------- --- ---------- ------ -------
              |       |      |         |      |
              |       |      |         |      -> Output filename.
              |       |      |         |
              |       |      |         -> "output" switch.
              |       |      |
              |       |      -> Page range to include in output.  This
              |       |         will catenate page 1 and pages 20 up
              |       |         to the end of the doc, effectively
              |       |         deleting pages 2 through 19.
              |       |
              |       -> "cat" switch.
              |
              -> Sets the "A" variable to your input PDF file
                 for use when specifying the page range.

kalos

  • Member
  • Joined in 2006
  • **
  • Posts: 1,824
Re: delete specific page range in a bunch of pdf files
« Reply #2 on: January 26, 2012, 07:58 PM »
excellent thanks!

Original address: https://www.donationcoder.com/forum/index.php?topic=29726.0