Attached sample pdf that took below time(approximately 2 seconds per page) for converting each page to image (png format). This is very critical for our application and I have seen this issue has been reported multiple times since 2008 or so without a resolution that I can search. Please point me in the right direction to get the issue sorted out as soon as possible.
Code snipped used
Hello,
velugula:Attached sample pdf that took below time(approximately 2 seconds per page) for converting each page to image (png format). This is very critical for our application and I have seen this issue has been reported multiple times since 2008 or so without a resolution that I can search. Please point me in the right direction to get the issue sorted out as soon as possible.Do you have a way to convert all pages in Pdf to corresponding number of png images in one shot without iterating through?Do you have any recommendation on how to improve the performance to convert each page below 0.1 second? What is the best timing that Aspose pdf can do with respect to converting to image?Page:1 took 1.7641447 secondsPage:2 took 1.2297482 secondsPage:3 took 1.8152112 secondsPage:4 took 2.0662391 secondsPage:5 took 2.0351087 secondsPage:6 took 2.1108472 secondsPage:7 took 2.0043022 secondsPage:8 took 2.1833687 secondsPage:9 took 1.6524625 secondsPage:10 took 0.427869 secondsHi Hemakumar,Thanks for sharing the resource file.I have tested the scenario and I am able to
notice the same performance related problem. For the sake of correction, I have logged this problem
as PDFNEWNET-40126 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.
Hi Nicolas,tampix:I have the exact same problem on Aspose.PDF 11.0.0 for Java, with values similar to yours.Any leads on how to improve Pdf Page -> PNG conversion performance?
Hi Team, any resolution on this issue? Many people have complained on this similar issue for several years and I am surprised that you have not prioritized this in your development queue.
Hi Hemakumar,velugula:Hi Team, any resolution on this issue? Many people have complained on this similar issue for several years and I am surprised that you have not prioritized this in your development queue.Please just don't ignore this as it is very important for us to optimize the image conversion time for rendering the pdf pages as images on mobile devices. Currently we are stuck due to Aspose pdf library not performing as shown in previous log statements.If I don't see any action from your side, I will escalate this to our management to see if we should explore other alternatives to Aspose. Please advise.
Hi
For reference I ran a slow file through this site:
simon.fairey:HiI find PDFs of scanned content take a lot longer to process than say a PDF created by Aspose from an Email for example.Given you say it's related to the complexity do you have any tips on how to reduce the complexity or flags that could be set to ignore aspects of the page processing that might not be relevant if all you are doing is converting it to an image?Hi Simon,Thanks for contacting support. I am afraid currently we do not offer the feature to reduce PDF complexity or its structure but in order to get optimized performance during PDF to Image conversion, we need to exclusively test the scenario related to each document (which will improve performance for other files with similar structure). Therefore we request you to please share the resource PDF file, so that we can test the scenario in our environment. We apologize for your inconvenience.
Thanks for your patience.
We are pleased to inform you that earlier reported issue PDFJAVA-35491, has been resolved in latest version Aspose.Pdf for Java 17.11.
Please try using the latest release version and in case you face any issue, please feel free to contact us.
We also faced same issue while converting from pdf to jpeg file . We tried to use aspose 17.11 jar file but same issue. Please help us on the same topic. which jar file is having the solution. Or we are missing anything to include.
Regards,
Ekta
Would you kindly use Aspose.PDF for Java 19.7 in your environment as it is latest version with improved performance. In case you still face any issue, please share your sample PDF with sample code snippet. We will test the scenario in our environment and address it accordingly.
Dear @asad.ali ,
I’m using Aspose.PDF for JAVA 19.11 version. I also have the same issue.
I using the https://convert.town/pdf-to-png is very fast.
Here is my sample code snippet.
ByteArrayOutputStream imageStream = new ByteArrayOutputStream();
Document pdfDocument = new Document(filePath);
Resolution resolution = new Resolution(96);
PngDevice pngDevice = new PngDevice(resolution);
pngDevice.process(pdfDocument.getPages().get_Item(pageCount), imageStream);
Attach my pdf
AsposeSample.pdf (2.5 MB)
Best regards,
Ziv
We have tested the scenario in our environment and noticed that API took ~60 seconds to convert your PDF into PNG Image(s). Please note that the API follows DOM (Document Object Model) due to which it loads complete document into memory and allocates its structural elements so that any kind of operation can be performed.
Nevertheless, we have logged a performance related ticket as PDFJAVA-40113 in our issue tracking system to further investigate whether this conversion time could be more improved. We will look into its details and keep you posted with the status of ticket resolution. Please be patient and spare us some time.
We are sorry for the inconvenience.
The issues you have found earlier (filed as PDFJAVA-40113) have been fixed in Aspose.PDF for Java 23.7.
Thank you for the clarification regarding the DOM. The performance improvements in Aspose.PDF for Java 23.7 are marginal.
Since it is hard to improve performance this way does aspose provide a different approach for high performance pdf to png conversion?
At the moment, we can offer only DOM and Facades approach to convert PDF into PNG and with every API update, we are focused on improving the API speed and performance. In your particular case, can you please share your sample PDF and the conversion time details that you are observing at your side? We will log an investigation ticket for it and share the ID with you.
The example can be found here https://forum.aspose.com/t/performance-issue-pdf-to-png/263995.
Which mechanism does the online pdf editor PDF Editor | Online and Free | Aspose.PDF use? It seems to be pretty fast.
We believe that an issue has already been logged for the situation discussed in the referenced thread. We will surely inform you once some progress is made regarding ticket resolution.
The online free Apps are combination of different Aspose APIs. Also, the server where they are hosted may offer enough memory for such features to execute fast. Nevertheless, your concerns have been recorded and we will surely inform you once we have some updates for you. We sincerely apologize for the inconvenience faced.