PDF Splitter

No downloads or installation required!

Split PDFs using our free online app or learn how it works with our embedded iText 7 Sandbox.

Use the free online PDF Splitter app

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

You can then choose the page where you want to split the PDF.

Click Split PDF and then download the results.

Or play in the iText 7 Sandbox

In this Sandbox you can see how the the splitting code works in iText 7, 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 com.itextpdf.kernel.utils.PageRange; import com.itextpdf.kernel.utils.PdfSplitter; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; public class PDFSplitter { private static final String ORIG = "/uploads/split.pdf"; private static final String OUTPUT_FOLDER = "/myfiles/"; public static void main(String args[]) throws IOException { final int maxPageCount = 2; // create a new PDF per 2 pages from the original file PdfDocument pdfDocument = new PdfDocument(new PdfReader(new File(ORIG))); PdfSplitter pdfSplitter = new PdfSplitter(pdfDocument) { int partNumber = 1; @Override protected PdfWriter getNextPdfWriter(PageRange documentPageRange) { try { return new PdfWriter(OUTPUT_FOLDER + "splitDocument_" + partNumber++ + ".pdf"); } catch (final FileNotFoundException ignored) { throw new RuntimeException(); } } }; pdfSplitter.splitByPageCount(maxPageCount, (pdfDoc, pageRange) -> pdfDoc.close()); pdfDocument.close(); } }

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.

Контактная информация

Остались вопросы? 

Мы готовы вам помочь. Обратитесь к нам, и мы ответим, как только сможем.

Связаться с нами
Оставаться в курсе

Присоединяйтесь к более чем 11 000 подписчиков и станьте экспертом iText PDF, следя за нашими новыми продуктами, обновлениями, советами, техническими решениями и событиями.

Подпишись сейчас