Java pdf to tiff

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ag201
Posts: 1
Joined: 2013-10-08T22:50:30-07:00
Authentication code: 6789

Java pdf to tiff

Post by ag201 »

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.
Post Reply