PDF Page Deleter

No downloads or installation required!

Delete pages from a PDF using our free online app or learn how it works with our embedded iText 8 Sandbox.


Use the free online PDF Page Deleter app

Click the box below to upload a PDF, or drag and drop a PDF into the box.

You will then be asked to specify the pages you want to remove from your PDF.

Click Delete Pages and then download the resulting PDF.

Or play in the iText 8 Sandbox

In this Sandbox you can see how the the page deletion code works in iText 8, and experiment with changing the code yourself.

Click Upload File and make sure the file name of the PDF you upload matches the name you specify in private static final String ORIG. Then click Execute to run your code. To remove an uploaded file, click the x displayed next to the file name.

You can click the switch at the top of the Sandbox to change between the embedded Java and C# compiler.

import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfReader; import com.itextpdf.kernel.pdf.PdfWriter; import java.io.IOException; public class PDFPageDeleter { private static final String ORIG = "/uploads/delete.pdf"; private static final String OUTPUT_FOLDER = "/myfiles/"; public static void main(String[] args) throws IOException { PdfDocument pdfDocument = new PdfDocument(new PdfReader(ORIG), new PdfWriter(OUTPUT_FOLDER + "deleted.pdf")); pdfDocument.removePage(1); //Note that as you remove a page the number of pages in your PDF will change pdfDocument.close(); } }
using iText.Kernel.Pdf; namespace PDFPageDeleter { public class PDFPageDeleter { private static string ORIG = "/uploads/delete.pdf"; private static string OUTPUT_FOLDER = "/myfiles/"; public static void Main(string[] args) { PdfDocument pdfDocument = new PdfDocument(new PdfReader(ORIG), new PdfWriter(OUTPUT_FOLDER + "deleted.pdf")); pdfDocument.RemovePage(1); //Note that as you remove a page the number of pages in your PDF will change pdfDocument.Close(); } } }
Disclaimer:

iText does not analyze the content of your uploaded or processed files. Users bear sole responsibility for the usage and content of their own files. All uploaded and processed files are deleted from our servers after users leave the page, or automatically after a period of 3 hours.



Contact

Still have questions? 

We're happy to answer your questions. Reach out to us and we'll get back to you shortly.

Contact us
Stay updated

Join 11,000+ subscribers and become an iText PDF expert by staying up to date with our new products, updates, tips, technical solutions and happenings.

Subscribe Now