Tag Archives: cool tricks

Selecting Pages from a PDF to Make a New (Smaller) PDF

Sometimes small, simple tasks perplex me. Today’s challenge: I’m on Windows 10, and have a 53 page PDF of a journal. I need to make a NEW PDF that only contains pages 26 to 43 (my article) so I can send my article to a researcher who is requesting it. I know you can do this with Acrobat, but I don’t have Acrobat, and still would like to figure out how to make the smaller PDF. Here’s what I learned how to do today:

The Easy Way

  1. Go to https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
  2. Find the GREEN button that says “Download PDFtk FREE” and click it
  3. After the download finishes, right click on the .exe file and Run it
  4. When the installer starts, click on all the default options all the way through “Finish”
  5. When installation is finished, go to the search box in the bottom left of your screen
  6. Type “cmd” and hit Enter to open the terminal window
  7. Navigate to the directory that contains your original PDF. I first typed D: to get to my auxiliary hard drive, and then cd Scratch to get to D:\Scratch where my full journal PDF was stored.
  8. Use this code:
    pdftk yourlargefilename.pdf cat 26-43 output youroutputfilename.pdf

    (replacing YOUR filenames and YOUR starting and ending page numbers instead of 26 and 43)

  9. Launch a File Explorer window and navigate to the directory you used in Step 7 above. Open the PDF file and check to make sure it contains only the pages you expect.
  10. There are LOTS more things you can do with PDFtk from the Windows command line, like you did in Step 8. Lots of other options are described at https://www.pdflabs.com/docs/pdftk-cli-examples/

After I finished, I stumbled upon another way that didn’t require downloading a free program, and only uses Google Chrome. (Sometimes those free programs bother me. What a great way to infiltrate computers… offer a totally useful utility completely for free. Consequently, my advice to you is to download it at your own risk. Including these instructions is in no way a guarantee from me that PDFtk is safe.)

 

The Even Easier Way

  1. Open Google Chrome
  2. Type Ctrl-O (that’s the letter O, not the number zero)
  3. Select the large PDF file that you want to snip
  4. Your PDF will open in the browser… click on the beginning and ending pages, and capture the page numbers
  5. Click the print icon in the far upper right corner of your browser
  6. Click the “Change” button to change destination to “Microsoft Print to PDF”
  7. Click the second radio button under Pages, and specify the start and end pages separated by a dash (for me, 26-43)
  8. Click Print, and select a filename for your new, snipped file
  9. After the PDF is generated, navigate to the directory you saved it in during Step 8. Open the file and check it to make sure the pages are as you expect.

 

The Sad News

I tried to use the staplr package in R to snip my PDFs, but I couldn’t get it to work. Will try again some other time 🙁