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

Free Support Forum - aspose.com

JAVA PDF 17.5 API Performance Issues continue

This is a continuation of the following post in the old forums

I created a local eclipse environment and tested the code here and am getting the SAME results (Unacceptable performance )

In processing the original htm file it took over eight seconds and processing a larger 50 page file took over 40 seconds.

So ya’ll are obviously doing something different to get it to process in under one second, I would like to know what that is.

I have screen shots of the time it takes and task manager output but there does not seem to be anyway to upload files in this new forum. (also a problem).

Hi Paul,

Thanks for writing back.

I have tested the scenario in eclipse with the HTML files, shared over previous mentioned thread, and code execution took 15 seconds to generate the PDF file. Please check following code snippet that I have tried to test the scenario. For your reference, I have also attached an output generated by below code, and screenshot of results over our end.

public void PerformanceTest()
  long start = System.currentTimeMillis();
  System.out.println("Read HTML File");
  java.io.File file = new java.io.File(dataDir + "democo2015base.htm");
  System.out.println("Create File Stream"); 
  java.io.FileInputStream fis = new java.io.FileInputStream(file);
  //System.out.println(file.exists() + "!!");
  //InputStream in = resource.openStream();
  System.out.println("Create Byte Array Outputstream");
  java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream();
  byte[] buf = new byte[1024];
  try {
        for (int readNum; (readNum = fis.read(buf)) != -1;) {
        bos.write(buf, 0, readNum); //no doubt here is 0
        //Writes len bytes from the specified byte array starting at offset off to this byte array output stream.
        System.out.println("read " + readNum + " bytes,");
      } catch (java.io.IOException ex) {
   System.out.println("Create Byte Array");
   byte[] bytes = bos.toByteArray();
   //instantiate Document Object with ByteArrayInputStream while passing byte array as argument
   System.out.println("Create PDF");
   com.aspose.pdf.Document doc = new com.aspose.pdf.Document(new java.io.ByteArrayInputStream(bytes), new com.aspose.pdf.HtmlLoadOptions());
   //get the page count of PDF file
   System.out.println("Output Number of Pages");
   System.out.println("Save PDF");
   doc.save(dataDir + "aspose_html_content.pdf");
   System.out.println("Spending time: " + (System.currentTimeMillis() - start)/1000 + "sec");
  }catch(Exception ex){

Please note that it was about the CPU usage which went up-to 83% just for 1 second while code execution, whereas the complete conversion process took 15 seconds, as shared above.

Please check the screenshot in which I have highlight the button/option to upload files in new forums. Moreover, would you please share the the larger HTML file, so that we can also test the scenario in our environment.

Best Regards,
Asad Ali

aspose_html_content.pdf (119.9 KB)
Performance Results.png (37.3 KB)
Add_Attachment.png (5.2 KB)

I tried to upload, but it says NEW users can not upload files.

When I click on the links above it says the files are restricted to forum owners / editors.

Hi Paul,

We are sorry for the inconvenience which you have faced. We are working over fixing the upload feature in the new forums and it will be available soon for the use. For now, you may upload your file(s) to some public file hosting (e.g dropbox) and share the link in your post.

Best Regards,
Asad Ali

Hi Paul,

We are pleased to share that the file upload feature has been fixed and now you can share the files within our forums. See attached image file.

aspose-Pdf-for-Java_100.png (3.0 KB)

FYI, when I click on the link in your post it still states that it is only viewable by editors.

When I click on the file upload icon it allows me to select the local files but still DOES NOT allow me to upload the files with the error --> “Sorry, new users can not upload attachments.”

When I drag and drop the files into this editor I get the same error message.

Hi Paul,

Thanks for sharing the details.

We are further looking into above stated issues and will get back to you soon. We are sorry for this inconvenience.

Hi Paul,

Thanks for your patience.

Can you please again try attaching the files and the feature should be working. In case you encounter any issue or you have any further query, please feel free to contact.

screenshots.zip (193.4 KB)

here are the uploaded files that show the performance issue in timing and performance

Hi Paul,

Thanks for sharing more details.

We will really appreciate if you can please share the HTML file(s), with which you are experiencing the same performance results which you have shared. We will test the scenario in our environment and address it accordingly.

Best Regards,
Asad Ali

While I can not send the actual HTML because it contains propriatary customer data I have included a sample html file and processing times. You can see that for this 47 page PDF it is still taking way too long to process and both the CPU AND MEMORY utilization spike and stay spiked for the duration of the processing.screenshots2.zip (145.3 KB)


Thanks for sharing the sample document.

I have tested the scenario in our environment and observed that API took 47 seconds to complete the conversion, as you said but the CPU and Memory Usage went up-to 99% for one second. I have generated a performance issue as PDFJAVA-36860 in our issue tracking system.

Our product team will further investigate the scenario and as soon as we have some updates from their side, we will surely inform you. Please be patient and spare us little time. We are sorry for the inconvenience.

Best Regards,
Asad Ali

I really NEED to have an update status on this OTHER than “please spare us some time” We are trying to run our business with these tools and they continue to fail. I NEED to know if this is HAS been addressed? Is BEING addressed. Or if like our previous bug reports it will be six months before there is any type of fix or solution.


Thanks for contacting support.

Please accept our humble apologies for the delay and inconvenience, which you have faced. Please note that each reported issue occupies equal significance and attention from us, though issues have been resolved and fixed on first come first serve basis. There are other high priority issues in the queue as well and our product team has been busy in resolving them as well as adding new features to the API.

Moreover, we have recorded your concerns and escalated the issue priority, by intimating relevant team about them. As soon as we receive some feedback regarding investigation of the issue, we will surely inform you. Your patience and comprehension is highly appreciated in this matter.

We are sorry for this inconvenience.

So it has been another MONTH with no update. I would like a status update please that DOES NOT INCLUDE ASKING ME TO BE PATIENT. I believe I have been patient enough. Just get me a status update so I can make the decision to wait for ya’ll or go with another product.


Thanks for your inquiry.

We are checking details with our product team, regarding your issue and will get back to you shortly.


Thanks for your patience and sorry for the delayed response.

Please note that issues are resolved in first come first serve basis as we believe it is the fairest policy to all the customers. However concerning to your reported issue, we managed to replicate the issue on June 23 and is still pending for review as the team has been busy fixing/investigating other previously reported issues. However as soon as we have some definite updates regarding its resolution, we will let you know.

PS, meanwhile I have also recorded your concerns with product team and they will consider them during the issue prioritization.

What this tells me is that NO ONE has even STARTED on trying to fix this issue. AFTER THREE MONTHS !


Thanks for writing us back and sorry for the delayed response.

We humbly apologize for the delay regarding resolution of your issue, and the inconvenience which you have been facing. Please note that we do realize the severity of the issue but due to large number of the pending issues in the queue, your issue has not been resolved.

However, we have raised your concerns to escalate the issue to next level. As soon as we receive some feedback from relevant team, we will definitely inform you. We highly appreciate your comprehension in this regard.

We are sorry for the inconvenience caused.

It has been another TWO WEEKS with NO status update. Please provide an update.