Hi Rommel,
We understand that you need to split the PDF into individual documents. However, direct support for splitting or importing pages is not currently available in Flutter. As an alternative, we recommend using the createTemplate method. You can find more details here: https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfPage/createTemplate.html
//Load the PDF document. PdfDocument loadedDocument = PdfDocument(inputBytes: File('Input.pdf').readAsBytesSync()); //Get the first page from the document. PdfPage loadedPage = loadedDocument.pages[0]; //Create a PDF Template. PdfTemplate template = loadedPage.createTemplate(); //Create a new PDF document. PdfDocument document = PdfDocument(); //Add the page. PdfPage page = document.pages.add(); //Save and dispose of the PDF document. File('Output.pdf').writeAsBytes(await document.save()); document.dispose();
|
Please try this on your end and let us know the result.
Regards,
Irfana J.