Split PDF into Single Pages

Split PDF into single pages

Use this workflow when each source page must become its own PDF file.

Steps

  1. Create a PdfFileEditor instance.
  2. Prepare an output file pattern that includes a page placeholder such as %NUM%.
  3. Call splitToPages with the source file and output pattern.
  4. Save the generated single-page files.
public static void splitPdfIntoSinglePages(Path inputFile, Path outputFilePattern) {
    PdfFileEditor pdfFileEditor = new PdfFileEditor();
    pdfFileEditor.splitToPages(inputFile.toString(), outputFilePattern.toString());
}