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

Free Support Forum - aspose.com

PDF to TIFF conversion performance

The java conversion seems far slower than the Dotnet offering. This sample file took 31 seconds with the java Aspose.PDF while the Dotnet Aspose.PDF only took 231 milliseconds.


I just downloaded the latest Aspose.Total for java and am using aspose-pdf-9.7.0-jdk16.jar.

Maybe I’m doing something wrong?

This is on a Windows 7 64bit workstation. Here’s my java code.

public static void main(String[] args) throws FileNotFoundException {
long tStart = System.currentTimeMillis();
// Open document
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(“C:\Test\PDF\test.pdf”);
System.out.println(“opened”);
// Create stream object to save the output image
java.io.OutputStream imageStream = new java.io.FileOutputStream(“C:\Test\PDF\test.tiff”);

TiffSettings tiffSettings = new TiffSettings();
tiffSettings.setCompression(CompressionType.CCITT4);
tiffSettings.setDepth(ColorDepth.Format1bpp);

// Create Resolution object
com.aspose.pdf.devices.Resolution resolution = new com.aspose.pdf.devices.Resolution(200);
// Create TiffDevice object with particular resolution
com.aspose.pdf.devices.TiffDevice tiffDevice = new com.aspose.pdf.devices.TiffDevice(resolution, tiffSettings);
// Convert a particular page (Page 1) and save the image to stream
tiffDevice.process(pdfDocument,1,4, imageStream);

// Close the stream
try {
imageStream.close();
} catch (IOException e) {
e.printStackTrace();
}
long tEnd = System.currentTimeMillis();
long tDelta = tEnd - tStart;
double elapsedSeconds = tDelta;
System.out.println(elapsedSeconds);
}


Hi Tom,


We are sorry for the inconvenience. We will appreciate it if you please share your sample PDF document here, so we will test the scenario and will update you accordingly.

Best Regards,

File uploaded per your request.

Hi Tom,


Thanks for sharing the source PDF, We have tested the PDF to TIFF conversion with Aspose.Pdf for .NET and Java and found the performance issue with Aspose.Pdf for Java. So we have logged an investigation ticket PDFNEWJAVA-34598 in our issue tracking system for further investigation and resolution. We will notify you as soon as we resolve it.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNEWJAVA-34598) have been fixed in Aspose.Pdf for Java 11.1.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.