Is the JAI API still needed?

I have been doing some work with PDFs using the Aspose.PDF.Kit and have not had any problems. Someone pointed out in the readme the dependency on the JAI API. It had a link to Suns web site which re-directed to Oracle. We can't seem to find a way to download it, it looks like it is only available as source code. Is the JAI API still needed for the PDF Kit? If so, what is it needed for? I have been doing things like get number of pages, set the permissions, and concatinate two PDFs together and have not had a problem so far.

Thanks.

Hi Scott,


Thanks for using our products.

JAI was required in Aspose.Pdf.Kit for Java during PDF to Image conversion. However since April-2013, Aspose.Pdf.Kit for Java has been merged into Aspose.Pdf for Java and now the product is not dependent on JAI. You can perform PDF to Image (JPEG, PNG, TIFF etc) conversion without referencing JAI in classpath. I would recommend you to please try using the latest release of Aspose.Pdf for Java and in case you encounter any issue or you have any further query, please feel free to contact.

The following code snippet shows how to convert PDF file to TIFF format.

[Java]

// instantiate PdfConverter object<o:p></o:p>

com.aspose.pdf.facades.PdfConverter converter = new com.aspose.pdf.facades.PdfConverter();

// set the resolution of resultant image file

converter.setResolution(new com.aspose.pdf.Resolution(300));

// bind the source PDF file

converter.bindPdf("C:\\pdftest\\AddImage_result.pdf");

// initialize the conversion process

converter.doConvert();

ByteArrayOutputStream outStream = new ByteArrayOutputStream();

// save the output in TIFF format

converter.saveAsTIFF(outStream);

FileOutputStream fout = new FileOutputStream("c:/pdftest/AddImage_result_test2.tiff");

fout.write(outStream.toByteArray());

Thank you for your response. I will look in to the newer version of PDF. So far it looks very different from pdf-kit, will take some time to figure out how to do what I was doing before with the new stuff.

Hi Scott,

Please continue using the new Aspose.Pdf for Java and in case you encounter any issue while migrating your code from Aspose.Pdf.Kit for Java to Aspose.Pdf for Java, please feel free to contact. I would suggest you to please visit the following links for further information on,

  • [Autoporting Aspose.Pdf for .NET to Java](https://blog.aspose.com/2013/03/23/auto-ported-version-of-aspose.pdf-for-.net-to-java-platform)
  • [Aspose.Pdf for Java and Aspose.Pdf.Kit for Java have Merged](https://blog.aspose.com/2013/05/03/aspose.pdf-for-java-and-aspose.pdf.kit-for-java-have-merged)
  • [First Release of Autoported Aspose.Pdf for Java](https://blog.aspose.com/2013/04/28/first-release-of-autoported-aspose.pdf-for-java)
  • [Structure of Autoported Aspose.Pdf for Java](https://blog.aspose.com/2013/04/07/jump-start-about-autoported-aspose.pdf-for-java)