Split PDF into Single Pages
Contents
[
Hide
]
Split PDF into single pages
Use this workflow when each source page must become its own PDF file.
Steps
- Create a
PdfFileEditorinstance. - Prepare an output file pattern that includes a page placeholder such as
%NUM%. - Call
splitToPageswith the source file and output pattern. - Save the generated single-page files.
public static void splitPdfIntoSinglePages(Path inputFile, Path outputFilePattern) {
PdfFileEditor pdfFileEditor = new PdfFileEditor();
pdfFileEditor.splitToPages(inputFile.toString(), outputFilePattern.toString());
}