Load a ten-page PDF and enter 2, 5-7. The preview must say remove 4 and keep 6. The retained source sequence is 1, 3, 4, 8, 9, 10, so those become output pages 1 through 6. Open the download and compare output pages 1, 2, 3 and 4 with source pages 1, 3, 4 and 8; that boundary sample catches both an off-by-one range and accidental reordering.

Expected evidence

Status is REMOVED, source pages is 10, removed pages is 4, kept pages is 6 and the download name is pages-removed.pdf. Output bytes depend on document objects and are reported only after serialization.

The result is a new PDF

PDFRemove does not edit the source container in place. It creates a blank PDF, copies the retained page objects in their original order and serializes a separate download. Document metadata, outlines, page labels, embedded files, portfolios, scripts, optional layers, tagged structure, PDF/A or PDF/X claims, usage rights, encryption, incremental revisions and digital signatures may not carry across. Forms, links, annotations, fonts and accessibility relationships can rely on document-level resources. Keep the source and never call the output signed, certified, archival, compliant or evidentiary merely because its visible pages look correct.