In our system, we need to split PDFs one page at a time.
PdfDocument#saveToFile() takes a long time though when the PDF has a lot of pages and large size,
Is there any way to improve this?
- Code: Select all
PdfDocument pdfDocument = new PdfDocument(pdfFilePath);
pdfDocument.saveToFile(dstFilePath, i, i, FileFormat.PDF);
The PDF(A) we tried this time is 2311 pages, about 76 MB, but it cannot be published.
I processed another PDF(B) with 2310 pages and it takes only a few milliseconds per page.
So I think PDF(A) is special.
However, do you have any tips on how to do this other than saveToFile() or where to tune it up?
* PDF(B) https://cartographicperspectives.org/in ... -issue/pdf
I increased this PDF by 30x.
OS: Windows 11
Java: 8 and 17
Spire.PDF: 10.7.3
Thank you