Free Support Forum - aspose.com

Converting TIFF to PDF with Aspose Imaging for Java

We use Aspose Imaging to convert TIFF 2 PDF.
Depending on Tiff file size, conversion lasts too long. For same tiff file, it takes 10 minutes to create PDF on one machine and one hour on another machine.

What can we do to get better performance (machine and/or java code)? Where to look?
Our code is simple:
public static void convertTiff2PDF(String dataDir, String sourceFile, String outputFile) {
try (TiffImage image = (TiffImage) Image.load(dataDir + sourceFile))
{
PdfOptions exportOptions = new PdfOptions();
exportOptions.setPdfDocumentInfo(new PdfDocumentInfo());

        image.save(outputFile, exportOptions);
    }

}

@elie.kach,

Can you please try using latest Aspose.Imaging for Java on your end. In case there is still an issue then please share the source file, generated PDF, used sample code, Java details, Operating System and memory details of machine with us on which you are getting job done in one hour. We will be able to investigate the issue further on provision of requested informtion.

Hi
I use the latest version (aspose-imaging-20.5-jdk16)
Java code:
public static void convertTiff2PDF(String dataDir, String sourceFile, String outputFile) {
try (TiffImage image = (TiffImage) Image.load(dataDir + sourceFile))
{
PdfOptions exportOptions = new PdfOptions();
exportOptions.setPdfDocumentInfo(new PdfDocumentInfo());
image.save(outputFile, exportOptions);
}

Java version 1.7.0_72 64 bits
Operating system: Windows Server 2012 R2, 64 bits
Intel Xeon CPU ES-2690, 2.9 GHz (2 processors)
RAM: 12 GB

Note: The java code is integrated within a document management system (Documentum).
If we run the java code as a standalone java application, there is no performance issue.

@elie.kach,

Latest version is Aspose.Imaging for Java 20.7. Please download that from this link.

Secondly, as requested earlier please share the source file and generated PDF as well.

Hi

I tried to share my source which is a tiff file but it’s not an authorised extension (Error message I got)

I used last version and still have same issue
Regards,

@elie.kach,

You can zip the file and then share with us. If the zipped file size is less than 3 MB, you can share it here. Otherwise, please upload on some file server and share link with us.

7221745086_BL_dpwtrv3q.zip (1.6 MB)
Attached file took 32 minutes to process within Documentum frame.

@elie.kach,

I have created an issue with ID IMAGINGJAVA-1797 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.