We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose words save to pdf slow on large files

We are currently evaluating aspose.words for .net version 14.7 and one of our odd test cases produced a word file with 1700 pages of text. When we saved the object as a word file (docx) it worked in less then 10 seconds. When we try to save it as a PDF, it takes longer than 15 minutes.


 var dstStream = new MemoryStream();
doc.Save(dstStream, SaveFormat.Pdf);



Hi Martin,

Thanks for your inquiry. It is quite difficult to answer such
questions because performance and memory usage all depend on complexity
and size of the documents you are generating. While rendering a document to fixed page formats (e.g. PDF), Aspose.Words needs to build two model in the memory – one for document and the other for rendered document.

Please note that the process of building layout model is
not linear; it may take a minute to render one page and may take a few
seconds to render 100 pages. Also, Aspose.Words has to create APS (Aspose Page Specification)
model in memory and this may again eat some more time for some
documents. Rest assured, we’re always working on improving performance;
but, rendering will be always running slower than simple saving to flow
formats (e.g doc/docx).

It would be great if you please share input Word document here for testing. I will investigate the issue on my side and provide you more information.

Here is the word file that get generated by aspose library. Also, just for a bit more information, I had to not do the doc.UpdateFields() call. If I do, then that process takes forever. This is an odd about of data, so I can understand if it takes a long time. What is the best way to worn the user that this may take a while. Also, I have let it run for more then 15 min and it didn’t finish. Is there some configuration I can set to let it use more cores or something like that?

Hi Martin,

Thanks for sharing the detail. Regarding performance issue, I have logged this problem in our issue tracking system as WORDSNET-10867. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.
mmikhail:

What is the best way to worn the user that this may take a while. Also, I have let it run for more then 15 min and it didn’t finish. Is there some configuration I can set to let it use more cores or something like that?

Unfortunately, there is no way to know how much time you
should wait before the conversion ends. We will consider adding a
Callback event that notifies you the progress of conversion. I linked
your request to the appropriate issue (WORDSNET-7187) in our issue tracking system and you will be notified as soon as this feature is supported.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-10867) have been fixed in this Aspose.Words for .NET 19.5 update and this Aspose.Words for Java 19.5 update.