Delete a page of PDF document

I have a pdf document with multiple pages. I need to delete the last page.

I need to check the last page of PDF document. If the last page has a word "DELETE_PAGE" then I need to remove this page.

Please help.

Hi,

Thanks for considering Aspose.

Aspose.Pdf is a component which is used to generate PDF documents from scratch, whereas there is another component named Aspose.Pdf.Kit which is used to manipulate/edit existing PDF documents.

I am afraid that searching for a particular word is not supported in Aspose.Pdf.Kit for .Net as of now. As a workaround, you can extract the text of the PDF document and search for a particular text string in it programmatically. Please visit the following link for information on how to Extract text from PDF document.

For removing any particular page in a PDF document please use the Delete method in the PdfFileEditor class.

In case it does not satisfy your requirement, you have any further queries, please feel free to contact us.