Delete one page

Delete one page

Forum member · Aug 29, 2007
Hi It is also possible to delete one certain page in a PDF File with your library ?

Re: Delete one page

Support · Aug 30, 2007
Hello, Yes, it is possible to delete the pages from a PDF document. In order to delete a page from the document you will have to use overloaded MergeDocument constructor which takes the starting page and the number of pages to merge. For e.g. if you have 10 page document and you want to remove page number 5, please look at the code below: PdfDocument pdf = new PdfDocument("filePath/DocumentA.pdf"); MergeDocument document = new MergeDocument( pdf, 1, 4 ); document.append(pdf, 6, 5); document.draw( "C:/temp/HelloWorld.pdf" ); Thanks, ceTe Software Support Team.