PDFs

The Files Nobody Can Edit

PDFs are made to be read, not changed. That’s why they’re so frustrating when you need to rearrange one, or get the numbers out of one.

Usually that means paying for special software. With Claude and a free Python library, you just ask.


What Claude Can Do With PDFs

ChoreExample request
Merge“Combine all the PDFs in this folder into one, in alphabetical order.”
Split“Save pages 3 to 5 of report.pdf as a separate file.”
Reorder or rotate“Move the last page to the front, and rotate page 2 the right way up.”
Remove pages“Make a copy of the contract without the blank pages.”
Extract text“Pull all the text out of these 20 PDFs into one text file.”
Extract tables“Copy the table on page 1 of every invoice into one spreadsheet.”
Fill in details“Stamp ‘PAID’ and today’s date on the top of each invoice.”

Some libraries Claude might suggest:

  • pypdf: merging, splitting, rotating, the everyday jobs.
  • pdfplumber: pulling out text and tables accurately.
  • PyMuPDF: more advanced editing, like adding text or images onto pages.

One Honest Limit: Scanned PDFs

There are two kinds of PDF, and they look the same on screen:

  • Digital PDFs (made on a computer) have real text inside. Claude can copy it out easily.
  • Scanned PDFs (photos of paper) are just pictures. There’s no text in them to copy.

Getting text out of a scanned PDF needs an extra step called OCR (optical character recognition: software that reads the letters in a picture). It works, but it can make mistakes, especially with handwriting or blurry scans.

If the text in a PDF can’t be selected with your mouse, it’s a scan. Tell Claude, so it plans for OCR and you know to check the results extra carefully.


Check the Result

Open every new PDF and look:

  • Are all the pages there, in the right order?
  • Is anything upside down?
  • For extracted tables: do a few numbers match the original exactly?

A note on private documents: the Python libraries run on your own computer, but anything Claude reads is sent to Claude so it can think about it. Be thoughtful with very sensitive files, like bank statements or ID documents.


Try it

Find two or three PDFs (bills, tickets, anything), copy them into a new folder, and ask Claude to merge them into one. Then ask it to split out just the first page of the merged file.

See an example prompt
Research the best Python library for merging and splitting PDFs, and recommend one. Then merge all the PDFs in this folder into one file called all-in-one.pdf, in alphabetical order, and save just its first page as first-page.pdf. Put both in an "output" folder, and don't touch the originals.