
The secretary has approved a six-page board packet. A committee member asks for the finance report that went to the board. The report is two pages long. So is the file that starts halfway through the estimate and ends with a motion for a vote.
To split a PDF by page range with Python, open the approved file with pypdf, select the pages that belong to the item, and write them to a new PDF. In our fictional Linden Reading Room packet, finance occupies pages 4–5. Reopen the extract beside the packet before attaching it to a message.
If you already have the approved two-page finance PDF and it matches the circulated pages, send that file. Use the range below when the released packet is your reference. If the packet is still being assembled, first check the attachment order and release the combined PDF.
Download the six-page packet, order sheet, Python script and both finance extracts. Open corrected-packet.pdf alongside approved-order.csv. The sheet identifies agenda item 3 as “Finance report,” revision R4. Item 3 starts on packet page 4 because the preceding minutes span two pages.
Go to the fourth page in the PDF viewer. Look for “Winter staffing estimate” and the footer “Attachment page 1 of 2.” Turn once. Page 5 says “Basis of estimate,” with “Attachment page 2 of 2” at the foot. The next page starts “Motion for decision,” revision R1. That heading marks where to stop.
Unzip the sample, open a terminal in its folder, and use a Python environment with pypdf installed. We used Python 3.12.14 and pypdf 6.21.4 on Windows. The script takes the source, the first and last viewer pages to include, and a new output filename.
python -m pip install pypdf==6.21.4
python split_range.py corrected-packet.pdf 4 5 finance-review.pdf
Both page numbers on the command line are inclusive. Inside the script, pypdf counts from zero and stops before the end index. For viewer pages 4–5 the start index is 3 and the stop index is 5. This is the line that selects both pages:
writer.append(reader, pages=(first - 1, last))
Keep the original packet in place. The sample script checks the range against the source page count and requires a new output filename. For another run, choose a fresh name so the copy you inspected is still available. See pypdf’s page-range example.
Hold the pages 5–6 extract. Open held-pages-5-6.pdf. The first page says “Finance report,” R4, which looks promising until you read “Basis of estimate” and the footer “Attachment page 2 of 2.” The second page asks the board to approve Saturday opening. The $2,400 figure appears on both pages, so searching for the amount would also miss the mistake. Correct the range before sending.
Release the pages 4–5 extract. Open finance-r4-pages-4-5.pdf, or the finance-review.pdf you just made. The opening estimate covers eight additional Saturday sessions. The last page explains the ceiling: eight sessions at $300 each total $2,400. Both pages carry the R4 finance heading. Check the filename in the attachment field against the one you just read.
For the sample release record, write down the source (corrected-packet.pdf), the inclusive range (4–5), the actual output filename and the decision.
If a revision adds a page to the minutes, the finance report moves from packet pages 4–5 to 5–6. Compare the file you sent with those two pages in the newly approved packet. If the finance pages still match, keep the extract and correct any page references you shared. If finance changed, or the recipient needs a file labeled for the new packet, save and check a fresh extract under a new filename. Tell each earlier recipient which file to use and which it replaces. Record both filenames, the source packet for each, and who received the replacement.
We opened both two-page extracts, read their headings and footers, and compared all four rendered pages with their selected pages in the approved packet. Their text and rendered images matched. The shifted file reproduced exactly the pages requested, which is why the editor’s range check matters. We checked ordinary PDFs locally. Signed files, interactive forms, confidential-document redaction and cloud processing were outside this example.
Pick one AI, compute, or storage workload and see the difference for yourself. Spin it up in minutes, or let our team map your fastest path to production.