From a stack of nine pages of a PDF document, the fifth page is marked for deletion with a red X

Delete Pages from a PDF to Sanitize Documents

Leverage the Split PDF API Tool to Reliably Remove Specified Pages and Content from a PDF
Share this page

You may be familiar with the process of document sanitization in which sensitive content is removed to ensure that viewers can only access the intended information. This can be performed through the removal of metadata or other hidden content, as well as through the removal of visible content via text redaction or page deletion. Sanitization is often used to meet regulatory compliance requirements, as with HIPAA in the US and GDPR in Europe. These practices are also used more generally to control access to information across different audiences.

While pdfRest does not currently offer a complete sanitization solution (let us know if you have specific needs), the API Toolkit does offer a robust solution for deleting any number of specified pages from a PDF with a single API Call.

The Split PDF API Tool can be used to split a single input PDF file into any number of output PDF files with selected pages for each. Deleting pages with this tool is as easy as defining a single output file with all of the pages you would like to keep, leaving out the pages you would like to remove. To delete page 1 from a PDF with multiple pages, you would set one output file with the pages set to '2-last'. To delete pages 2-4, 6, and 10, you would set the pages to '1,5,7-9,11-last'. What if you want one group to have access only to pages 1-5 and another group to have access only to pages 6-10? With a single API Call, you can create two output files with the corresponding pages selected for each.

What happens to the pages that are excluded from the page selection? They are removed from the output PDF generated by Split PDF, and all content that was on those pages is also removed from the new document. It is as if those pages and their content simply never existed in the new file.

When it comes to sanitization, you want to be sure you're working with high-quality technology that really removes all traces of the information you're aiming to sanitize. History is riddled with examples of sanitization gone wrong. pdfRest offers the best of the best Adobe PDF technology for reliable sanitization results.

Code Example: Delete Page 10   |   Load this into API Lab↗


    curl -X POST "https://api.pdfrest.com/split-pdf" \ 
        -H "Accept: application/json" \ 
        -H "Content-Type: multipart/form-data" \
        -H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
        -F "file=@PATH_TO_FILE/pdfRest.pdf" \ 
        -F "pages[]=1-9,11-last" \
        





Split PDF


Generate a self-service API Key now!

Create your FREE API Key to start processing PDFs in seconds, only possible with pdfRest.

Compare Plans
Contact Us