I am using Java (Eclipse, maven, tomcat) and trying to convert a pdf to tiff. I am getting the following error,
Exception in thread "main" java.lang.UnsatisfiedLinkError: no JMagick in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
I am using maven and retrieving im4java and jmagick jars (so they are both in my build path).
I have downloaded ImageMagick-6.8.7-0-Q16-x64-dll.exe and copied all dll's from the installation folder into my jre bin and even c:\windows\syswow64 folder.
My source looks like this,
private static ImageInfo getImageInfo(File inputName) throws MagickException {
ImageInfo info = new ImageInfo("c:\\a.pdf");
info.setDensity("300");
info.setCompression(CompressionType.Group4Compression);
info.setColorspace(ColorspaceType.RGBColorspace);
info.setAdjoin(1);
return info;
}
In my main method I have this,
MagickImage image = new MagickImage(info);
image.setFileName(inputFile.getName());
image.setImageFormat("TIFF");
image.writeImage(info);
Any idea how to fix this,
Thanks.