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

Free Support Forum - aspose.com

Performance to create PDF compared to Aspose.Pdf


I’m an Aspose.Total subscriber, so I’ve got both Aspose.Words and Aspose.Pdf.

I need to create a new PDF document and I’m wondering: is there any performance difference between using the new Aspose.Words “Document.SaveToPdf” feature and using Aspose.Pdf directly? (memory consumption, speed, etc.)

What is the “Aspose recommandation” for such a situation ? Use Aspose.Word or Aspose.Pdf ?

Of course, Aspose.Word would yield greater flexibility in case I ever need another output format, but that’s not my biggest concern at the moment.



Thank you for your interest in Aspose products.
It has been possible to convert Word documents to PDF with Aspose.Words for .NET for long time, but it required two components Aspose.Words and Aspose.Pdf operating together. This conversion works well, but the fact that two products are involved has its costs for customers.
Starting from Aspose.Words 6.0.0 new Rendering Engine was introduced. It is making Aspose.Words convert documents to PDF directly. Using the Aspose.Words’ direct to PDF conversion gives you the following advantages:
· Improved performance. There is no need to save a document and images into intermediary XML to pass between Aspose.Words and Aspose.Pdf.
· Better fidelity. Aspose.Words Rendering Engine has been explicitly designed to reproduce Microsoft Word’s way of paginating and printing documents.
· Simpler code. Convert to PDF with as little as one line of code. The legacy conversion required writing about 20 lines of code.
· Cleaner deployment. There is no need to find temporary storage for image files to pass between components.
· Healthier support. Deal with only one support team instead of two if you have any issues.
· Cheaper. Buy only one component instead of two (unless you are buying Aspose.Total of course).
Please note, the legacy conversion that requires Aspose.Words and Aspose.Pdf is will be supported only throughout 2009.
Best regards.

That’s only a copy-paste from another thread, such as this blog post, so please add new information.



I made some testing of conversion performance. As you can see Dirrect conversion works much faster that conversion using Aspose.Words+Aspose.Pdf.
Test #1 : Aspose.Words time = 1,71875 sec Aspose.Pdf time = 2,0625 sec
Test #2 : Aspose.Words time = 1,21875 sec Aspose.Pdf time = 3,609375 sec
Test #3 : Aspose.Words time = 1,140625 sec Aspose.Pdf time = 5,734375 sec
Test #4 : Aspose.Words time = 0,453125 sec Aspose.Pdf time = 2,734375 sec
Test #5 : Aspose.Words time = 0,59375 sec Aspose.Pdf time = 2,328125 sec
Test #6 : Aspose.Words time = 1,1875 sec Aspose.Pdf time = 3,375 sec
Test #7 : Aspose.Words time = 2,15625 sec Aspose.Pdf time = 4,4375 sec
Test #8 : Aspose.Words time = 1,765625 sec Aspose.Pdf time = 3,28125 sec
Test #9 : Aspose.Words time = 0,78125 sec Aspose.Pdf time = 6,671875 sec
Test #10 : Aspose.Words time = 0,265625 sec Aspose.Pdf time = 2,453125 sec
Test #11 : Aspose.Words time = 0,234375 sec Aspose.Pdf time = 2,546875 sec
Test #12 : Aspose.Words time = 2,109375 sec Aspose.Pdf time = 3,140625 sec
Test #13 : Aspose.Words time = 1,78125 sec Aspose.Pdf time = 6,3125 sec
Test #14 : Aspose.Words time = 0,203125 sec Aspose.Pdf time = 2,234375 sec
Test #15 : Aspose.Words time = 0,875 sec Aspose.Pdf time = 2,828125 sec
Test #16 : Aspose.Words time = 0,453125 sec Aspose.Pdf time = 2,390625 sec
Test #17 : Aspose.Words time = 2,859375 sec Aspose.Pdf time = 3,4375 sec
Test #18 : Aspose.Words time = 0,28125 sec Aspose.Pdf time = 2,34375 sec
Test #19 : Aspose.Words time = 1,328125 sec Aspose.Pdf time = 3,15625 sec
Test #20 : Aspose.Words time = 0,359375 sec Aspose.Pdf time = 2,421875 sec
However, if I understood you correctly, you would like to create PDF from scratch. You can try to create the same document using Aspose.Words and Aspose.Pdf and compare performance. If you need, I can help you to do that. If so, please tell me what kind of documents you need to generate, what document elements will be used, what size of document etc. Performance is closely related to the complexity of a document.
Best regards.

However, if I understood you correctly, you would like to create PDF from scratch

Exactly. Should I use Aspose.Words or Aspose.Pdf directly ?

The document is a statement of account (see attachement for a sample) So it’s the same 1-page section repeated over and over again for as many times as there are clients. Each time, with different data obviously. The final document can be anywhere between 1 page and 1000 pages.


Hello Dominic!
Thank you for details.
You can choose any approach you like better. For this task you can create a one-page MS Word document with merge fields and use it as a template in mail merge operation. After mail merge you will save the result in PDF format using SaveToPdf. You can also create documents from scratch with Aspose.Words. On the other hand, you can programmatically create a PDF document using only Aspose.Pdf. Fourth solution is creating an Aspose.Pdf XML programmatically and then processing it with Aspose.Pdf.
Note that the first mentioned method (mail merge plus SaveToPdf) is usually more effective. You can edit your template in MS Word and see how the result will look. And you need only several lines of code. Direct saving to PDF takes less time for most input documents, as you can see from the previous post of my colleague.
Refer this documentation chapter to learn about mail merge in Aspose.Words: