Convert pdf to jpg for free on windows using open source tools

To convert pdf to jpg on windows you can use existing open source tools ImageMagic and GhostScript.

Get and Install latest ImageMagic from:

http://www.imagemagick.org/script/binary-releases.php#windows

Ensure that you install with OLE support (for scripting with VBScript)

Get and install latest GPL version of Ghostcript from sourceforge

http://sourceforge.net/projects/ghostscript/files/GPL%20Ghostscript/

Unfortunately there is no GUI for ImageMagic but you can use script below, just save it in pdf2jpg.vbs – to run the script just drag all pdf files that you want to convert on script icon. The resulting images will have the same name but with jpg extension and they will be placed in the same directory as pdf files.

Set imageMagick = CreateObject("ImageMagickObject.MagickImage.1")
For Each name in Wscript.Arguments
       pdf = Replace(name, ".pdf", ".jpg")
       imageMagick.Convert name, "-resize", 650, "-quality", 80, pdf
next

With ImageMagic you can do lots of cool stuff like create, edit, compose, convert bitmap images, scale, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

For more information see command line and COM+ ImageMagickObject documentations.

Instead of VBScript you can use other languages.

About these ads

, ,

  1. #1 by Robert on October 26, 2011 - 19:09

    Thanks for this it was very helpful. My problem is I’m making 1600px jpgs and they don’t look so great. I increased the JPG quality to 100 but that doesn’t solve the issue. Seems like there should be a way to dictate how the PDF is rendered?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: