When someone asks for "page 3 of your statement" or "the discharge summary", the easy thing is to send the whole PDF. That hands over every other page too: other transactions, other diagnoses, an address, an account number. Cutting the file down to the pages they asked for takes a minute, and there's one detail that catches people out: some ways of doing it keep data from the pages you removed. I tested everything below on a dummy 8-page bank statement I generated with fake numbers (title, author and an account number in its metadata, one bookmark per page).
The built-in routes
You probably already have something that can do this.
- macOS Preview: View > Thumbnails, select the pages you want (Cmd-click for several), and drag them onto the desktop. Preview makes a new PDF from just those pages. Another way is File > Print, set the page range, then PDF > Save as PDF at the bottom left.
-
Chrome or Edge, any OS: open the PDF in the browser, Print, choose "Save as PDF" (Chrome) or "Microsoft Print to PDF" (Edge on Windows) as the printer, set Pages to Custom and type something like
3-4or2,5. - Acrobat Reader: the free Reader can't extract pages itself, but its Print dialog with "Microsoft Print to PDF" or the Mac "Save as PDF" does the same job.
I ran the tests on Linux, so I haven't clicked through these apps for this post. The print routes write the pages out again through the printing system rather than copying them, so check the result: zoom in on small print, and see if the text can still be selected if that matters to whoever's receiving it.
The command line: qpdf
qpdf copies pages without re-rendering them, so text, fonts and images stay exactly as they were. I used qpdf 12.4.2.
qpdf --empty --pages statement.pdf 3-4 -- pages-3-4.pdf
--empty starts from a blank document, --pages names the input and the range, and -- ends the page list. The range syntax is worth knowing:
3-4 pages 3 and 4
2,5 page 2 then page 5, in the order you type them
7-z page 7 to the last page (z is the last page)
r2-r1 the last two pages, counted from the end
1-z,x5 every page except 5
I checked each one by pulling the text back out of the result with pdftotext and looking for a marker I'd printed on every page. 1-z,x5 and 1-4,6-8 both gave the same 7 pages, and 5,2 really did put page 5 first.
The gotcha: what comes along from the original
qpdf's own help (qpdf --help=page-selection) starts with a form that uses an input file as the base instead of --empty, and says "Document-level information, such as outlines, tags, etc., is taken from in.pdf and is preserved in out.pdf." Here's what that means in practice:
qpdf statement.pdf --pages . 3-4 -- pages-3-4.pdf
The . means "the main input file". This gives the same two pages, but it keeps what belongs to the document rather than to a page. Here's what each output carried, from pdfinfo and a count of bookmark entries with pypdf:
pages Title / Author / Subject bookmarks
original 8 yes (incl. account number) 8
qpdf ... --pages . 3-4 2 yes, all kept 8
qpdf --empty --pages 3-4 2 none 0
pdfseparate + pdfunite 2 none 0
So the two-page file from the . form still had the account number in its Subject field and all eight bookmarks, which name pages that aren't in it anymore. In a real statement, bookmark titles and metadata can say a lot. Use --empty when the point is sharing less, and check with:
pdfinfo pages-3-4.pdf
and look at the bookmarks pane in your viewer. pdfinfo only shows the info dictionary; there can also be XMP metadata, which exiftool -a -G1 file.pdf lists.
One more thing to check before sending: a split never changes what's printed on the pages you keep. If page 3 has your full account number in its header, so does the extract.
Poppler, if that's what you have
pdfseparate writes one file per page, and pdfunite joins them:
pdfseparate -f 3 -l 4 statement.pdf page-%d.pdf
pdfunite page-3.pdf page-4.pdf pages-3-4.pdf
%d becomes the page number. Neither tool brought over the metadata or bookmarks in my test.
Password-protected files
Most bank statements open with a password, and splitting needs that password because the page tree is encrypted. qpdf without it:
$ qpdf --empty --pages locked.pdf 3-4 -- out.pdf
qpdf: locked.pdf: invalid password
With it, you put --password= after the file name inside the page list:
qpdf --empty --pages locked.pdf --password=YOURPASSWORD 3-4 -- out.pdf
The result came out unencrypted (pdfinfo says Encrypted: no), which is usually what the person asking expects, but it means the extract no longer needs a password, so send it the way you'd send any unprotected document. pdfseparate failed on the locked file with "Incorrect password", and the version I have (poppler 25.03.0) has no password option at all, so remove the password first if you're using poppler. Typing a password on the command line also leaves it in your shell history. qpdf has --password-file=, but it isn't accepted inside the --pages list (I got "unrecognized argument"), so to keep the password out of history, decrypt first and split the decrypted copy:
qpdf --decrypt --password-file=pw.txt locked.pdf unlocked.pdf
qpdf --empty --pages unlocked.pdf 3-4 -- pages-3-4.pdf
Then delete pw.txt and unlocked.pdf.
A browser option
I built ToolOcean, and its split page does the --empty kind of extraction in the browser without uploading the file. I ran the dummy statement through the live page in headless Chrome with the range 3-4: it saved split_pages_3-4.pdf with 2 pages, no Title, Author or Subject, and no bookmarks. The only network request after I picked the file was a 326-byte analytics ping, nowhere near the size of the PDF. Two differences from qpdf: it sorts pages into ascending order, so 5,2 gives page 2 first, and it can't open a password-protected file (it showed "Could not read the PDF file" for my locked copy), so remove the password first: toolocean.co/pdf-split.
Drafted with AI help, tested and checked by me.
Top comments (1)
The --empty vs. --pages . distinction is the most valuable thing in this post. I've been using qpdf for years and never realized that the default form preserves the original document's metadata and bookmarks. That's a privacy leak hiding in plain sight — you extract two pages, but the Subject field still has the account number and the bookmarks still name every page you removed.
I'd add one more check: after splitting, open the result in a different viewer (not just the one you used to create it) and look at File > Properties. Some viewers cache metadata or show XMP fields that pdfinfo doesn't list. exiftool -a -G1 is the thorough option, but even a quick look at the document properties in Acrobat or Preview can catch something.
The password history warning is also important. I've seen people leave passwords in their bash history for months without realizing it. The --decrypt first approach is the right workaround, even if it's a bit more work.