Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Aug 13, 2024 2:09 pm

Hello,

Converting a Word (DOC) file to PDF it's very slow for bigger documents, for example a 400 pages document takes almost 20 minutes, and for a 1100 pages document it didn't finish after more than 3 hours.
Here's the code used, obviously the part that's taking forever is "doc.SaveToFile(outputFilePath, FileFormat.PDF)":

// Create a Document object
Document doc = new Document();
// Load a Word document
doc.LoadFromFile(inputFilePath);
// Save the new document to PDF
doc.SaveToFile(outputFilePath, FileFormat.PDF);
// Dispose resources
doc.Dispose();

Is there any other suggested approach when converting bigger documents to PDF?
Thanks

jst_curious
 
Posts: 3
Joined: Wed Jan 17, 2018 10:58 pm

Wed Aug 14, 2024 3:32 am

Hello,

Thanks for your inquiry. Are you testing with our latest version(Spire.Doc Pack(hot fix) Version:12.8.2)? If not, you can try to upgrade to the latest version, it includes more fixes and optimizations. If your problem still persists after using the latest version, to help us further investigate it, you can upload your big Word document and then share a download link. You can share it here or send email to us ( support@e-iceblue.com). Thank you in advance.

Sincerely,
Amin
E-iceblue support team
User avatar

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

Wed Aug 14, 2024 6:14 pm

Thank you for your reply, I've sent an email with the file, I had the same result with the latest version.

Thanks

jst_curious
 
Posts: 3
Joined: Wed Jan 17, 2018 10:58 pm

Thu Aug 15, 2024 7:18 am

Hello,

Thank you again for your feedback! I test your word document, as you mentioned, the program hangs a long time to do the conversion. This should be caused by some special data within the document. Anyway, I have logged this issue in our bug tracking system under the number SPIREDOC-10764. Our Dev team will investigate it further, once there is any update, we will let you know. If you have any other questions, please feel free to write to me.

Sincerely,
Amin
E-iceblue support team
User avatar

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

Fri Sep 06, 2024 3:22 am

Hello,

Greetings from E-iceblue.
I am writing to update you on the status of the issue SPIREDOC-10764. Based on the Word document you provided, we found that a paragraph in the document occupies 689 pages. Our Dev team did some investigations and found that this layout is the main reason for slow performance. Usually, a paragraph does not contain so many pages. Of course, in response to this situation, Our Dev team will further investigate and optimize it. During this period, we would like to further confirm whether the documents in your actual scenario are also in the same situation, as we have found that the content ("xxxxx") of your document has been replaced and processed. Thank you in advance for your feedback.

Sincerely,
Amin
E-iceblue support team
User avatar

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

Thu Sep 12, 2024 7:06 pm

Hello,

Sorry for the late reply, yes, the original documents are in the same scenario, not sure how they get created but we do need to process them, we used to use Word interop for this, and that worked fine and fast, but now we don't have that option anymore, so please keep me posted of any progress from your Dev team, thank you

jst_curious
 
Posts: 3
Joined: Wed Jan 17, 2018 10:58 pm

Fri Sep 13, 2024 1:37 am

Hello,

Thanks for your inquiry. I have made it clear to our dev team that the document layout in Word you provided is based on your actual scenario, they will do further investigation and optimization, once there is any significant progress, I will notify you immediately. Thank you for your patience.

Sincerely,
Amin
E-iceblue support team
User avatar

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

Return to Spire.Doc

cron