Converting from PDF to GIF



We are using Aspose to convert PDF- and DOCX-files to GIF-file.

We have an OutOfMemory error when we try to convert PDF-file with special symbols inside a text layer to GIF-file.

We are trying to do it using code:

com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(“D:\test.pdf”);

for (int page = 1; page <= pdfDocument.getPages().size(); page++) {
_ try ( imageStream = new FileOutputStream(“D:\” + page + “.gif”)) {_
_ Resolution resolution = new Resolution(100);_
_ GifDevice jpegDevice = new GifDevice(resolution);_
_ jpegDevice.process(pdfDocument.getPages().get_Item(page), imageStream);_
_ }_

Also I’m attaching the PDF-file4asposeissue_3.pdf (2.4 MB)
file as example.



We are unable to download your source PDF document. Kindly upload a Zip of this PDF document. We will investigate and share our findings with you. Your response is awaited.

#3 (2.3 MB)




We managed to replicate the problem of memory consumption, and then out of memory error. We have logged an investigation under the ticket ID PDFNET-43825 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.


Hello! Do you have any information about the issue?



The linked ticket ID PDFNET-43825 is pending for the analysis and not resolved yet. Our product team will investigate as per their development schedules. We will let you know once a significant progress has been made in this regard.