Some test text!

menu
search
Remove pageskeyboard_arrow_down

Remove pages

To remove pages from a PDF document.

PDFDoc doc(filename);

// Remove the fifth page from the page sequence.
doc.PageRemove(doc.GetPageIterator(5));

// Remove the third page.
PageIterator i = doc.GetPageIterator();
i.Next();
i.Next();
doc.PageRemove(i);

Merge, copy, delete, and rearrange PDF pages
Full code sample which illustrates how to copy pages from one document to another, how to delete, and rearrange pages and how to use ImportPages().

linkAbout removing/deleting pages

PDFDoc.PageRemove(itr) only removes the page from document's page sequence. The page and its resources are still available until the document is saved in 'full save mode' with the 'remove unused objects' flag. If you are saving the file in 'incremental mode', the serialized document may contain the content of the removed page.

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.

PDFTron Receives USD$71 Million Growth Investment Led By Silversmith Capital Partners

Learn More
close