Free Support Forum -

Slow html -> PDF conversion

I’m using the aspose.pdf java, trial version, aspose.pdf-17.7.jar, Java 8, windows 10 x64. 16GB memory.

I’m triyng to figure out why PDF generation is taking a long time. The following code takes ~4 seconds to run, even though it’s an extremely simple HTML document. Is there something I’m missing or not setting up correctly, or is it really just that slow?

 public static void main(String[] args) {
    long startTime = System.nanoTime();
    String processedHTML = "My Test HTML<BR><BR>Couple lines<br><BR>Nothing insane<BR><BR>";
    try {
        InputStream htmlStream = new ByteArrayInputStream(processedHTML.getBytes(;
        Document doc = new Document(htmlStream, new HtmlLoadOptions());
        ByteArrayOutputStream output = new ByteArrayOutputStream();;
    } catch (UnsupportedEncodingException e) {

    long endTime = System.nanoTime();

    long duration = (endTime - startTime);  //divide by 1000000 to get milliseconds.


We managed to replicate the problem of slow conversion in our environment. It has been logged under the ticket ID PDFJAVA-37085 in our issue tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

Is there someplace I can see that ticket? I’m having trouble convincing the bosses to drop $25k without more information about the slow conversion happening here…

Normally, the performance issues are known as complex issues and take more time than usual defects. You can ask for an update in this thread and we will notify you once the ticket ID PDFJAVA-37085 is resolved.

We are seeing the same thing, has any thing been done to speed it up.

It seems to have got slower when we updated our libraries.

The linked ticket ID PDFJAVA-37085 is pending for the analysis and not resolved yet. We keep improving the performance because it is a continuous process. We will let you know once a significant progress has been made in this regard.

Was this issue ever resolved? I was not sure where I could find the status of the ticket ID: PDFJAVA-37085


Sadly, the issue is not yet resolved. It is logged in our internal issue management system and you cannot track it. However, we will notify you within this forum thread as soon as it is resolved. Please spare us some time.

We are sorry for the inconvenience.