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

Free Support Forum - aspose.com

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,