Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Oct 04, 2024 3:03 pm

Hi,

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

team_ssb
 
Posts: 24
Joined: Fri Nov 26, 2021 1:30 pm

Tue Oct 08, 2024 9:42 am

Hello,

Thanks for your inquiry. Yes, the conversion efficiency issue is related to the elements contained in the PDF file itself. As for your issue, we suggest that you update to the latest version(Spire.PDF for Java Version:10.9.0) for testing, as the new version includes more fixes and optimizations. If the issue still persists, please provide us with your actual PDF(A) document for investigation and analysis. You can replace sensitive content in the actual document and upload it, then share the download link with us here or send it via email (support@e-iceblue.com). Thank you in advance. Thank you in advance.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 283
Joined: Mon Jul 15, 2024 5:40 am

Thu Oct 10, 2024 3:32 pm

Hello,
Thanks for your reply.
I will try to update first.
Thank you

team_ssb
 
Posts: 24
Joined: Fri Nov 26, 2021 1:30 pm

Fri Oct 11, 2024 6:20 am

Hello,

Thanks for your feedback. If the issue persists after the update, please feel free to provide feedback to us at any time.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 283
Joined: Mon Jul 15, 2024 5:40 am

Return to Spire.PDF

cron