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

Free Support Forum - aspose.com

Performance during html to pdf conversion


We are evaluating the aspose for our one of client to generate pdf file using html.

We observed that the performance of the pdf generation is bit slow.
The first request to the aspose in the application is taking around 20sec and where as the consequent requests take around 1.5 to 2sec. PFA logs where we observed in our server logs.

Can you please let us know if there are any points that we need to take care during the conversion of html to pdf.

Also, observed that, loading the generated pdf in to browser is taking time even after the pdf got generated using aspose, this was not happening when we used other tool for conversion.

Please find the attached screenshot for this: load_pdf_browser.png

Thanks in advance.


Hi Shivaji,

Thanks for your inquiry. This seems to be an expected behavior i.e. the first time after web server is restarted, rendering a Word/Html document to PDF takes more time than any subsequent conversions. Aspose.Words needs to pre-cache fonts and other resources for rendering. This only happens for the first conversion. If you want to do this pre-caching earlier then you can simply call doc.UpdatePageLayout() on an empty document before converting Word/Html to PDF. I hope, this helps.

Secondly, please upgrade to the latest version 15.9.0 from following link to see if it resolves the issue on your end.

In case the problem still remains, please zip and attach your input Html document here for testing. Please also create a standalone runnable simple Java application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing. We will then investigate the issue on our end and provide you more information.

Best regards,


After implementing the aspose in our application, we are
facing many issues like total application became very slow on pre prod env, we are not
able to proceed further and not able to decide whether to buy this
product or not our client is not happy with this.

Please suggest if there are any factors, which
can help us to look into to improve the performance of the application
along with Aspose.

One factor we have observed is, the old tool
which we were using was taking around 1.5 seconds to produce the pdf
file, with aspose its taking more than double of the time which old tool
was taking. that is around 3.5sec to generate the pdf file from html.

Please let us know if this is the expected performance with Aspose. :-/

We have tried using the latest jar files for aspose.word(aspose-words-15.9.0-jdk16) and aspose.pdf(aspose.pdf-10.8.0), then we faced different issues like font was not visible in the pdf and the right aligned text was missing few chars at end, hence we reverted to the old versions of the aspose(aspose-pdf-10.2.0, aspose-words-15.7.0-jdk16) where our initial POC was done.

Please let us know the stable versions of aspose.


Hi Shivaji,

Thanks for your inquiry.

Unfortunately we have no benchmarks available for performance/memory tests yet. Please note that when rendering document to PDF, XPS, image or printing it, Aspose.Words needs to build a ‘page layout’ of the document internally. Roughly, Aspose.Words layouts 10 pages per second; so, the extra amount of time Aspose.Words takes to format a document into pages depends on the number of pages your Word document has.

Also, 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. 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 such as DOCX/DOC/RTF/ODT etc. In case, you’re observing considerable performance issues, please zip and attach a sample Word/HTML document for our reference for testing.

Regarding PDFNEWJAVA-35295, please follow your other thread for further proceedings.

Best regards,