java.lang.NoClassDefFoundError: com/sun/media/jai/codec/SeekableStream

Hi there,

I am getting an error (java.lang.NoClassDefFoundError: com/sun/media/jai/codec/SeekableStream) when running the following code:

PdfConverter converter = new PdfConverter();


converter.bindPdf(“text.pdf”);


converter.doConvert();


String prefix = “D:/Test/”;


String suffix = “.png”;


int imageCount = 1;


while (converter.hasNextImage())


{


converter.getNextImage(prefix + imageCount + suffix, ImageType.PNG);


imageCount++;


}


Can you perhaps help me?

Thanks,

Roy

Hi Roy,

You also need to install Java Advanced Imaging (JAI) at your end in order to process the images. Once JAI is installed, please set jai_codec.jar and jai_core.jar paths in the CLASSPATH variable.

I hope this helps. If you still find any issues, please do let us know.
Regards,