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

Free Support Forum - aspose.com

PDF to Tiff Conversion Memory Usage

The TiffDevice class in the Java API (v10.9.0) appears to perform the conversion in memory before writing to the output stream. This limits the size of the documents we can convert. For instance, a 90 page test document exceeded 2G of RAM without any bytes written to the output file.

Is there a better way to convert large documents?

Sample code:

InputStream source = new FileInputStream(“spring-data-mongodb-reference.pdf”);
TiffSettings settings = new TiffSettings();

Document pdf = new Document(source);
TiffDevice tiff = new TiffDevice(new Resolution(300), settings);

OutputStream out = new FileOutputStream(“test.tif”);
tiff.process(pdf, out);

Hi Mike,

Thanks for your inquiry. I have tested the scenario and noticed the reported performance issue, so logged a ticket PDFNEWJAVA-35351 in our issue tracking system for further investigation and resolution. We will keep you updated about the issue resolution progress.

Moreover, please note Aspose.Pdf uses memory for processing instead disk space. So performance depends upon the file size/contents and system resources.

We are sorry for the inconvenience caused.

Best Regards,