PDF to Images

From EpixStudios

Jump to: navigation, search

It is sometimes necessary to convert a PDF into a raster image for editing or viewing on devices that cannot read PDFs.

The most basic way to do this is with ImageMagick, shown below.

convert sample.pdf sample.jpg

The default method (with no arguments) assumes a resolution of 72DPI to create the raster image. However, most PDF are designed for printing at much higher resolutions (300DPI+) so you need a bigger raster image to see the detail. You may think you could use the options 'resize', 'resample' or 'scale' but these will just perform the scaling to the raster image after it has been converted at 72DPI. The option you need is 'density' followed by the resolution in dots per inch.

The following command will create a much more detailed JPG than before, rendering the PDF to bitmap at 200DPI.

convert -density 200 sample.pdf sample.jpg
Personal tools