Menu

PDF to JPEG

← TOC    ↑ Home    PDF EPS SVG PNG JPEG ICO XPM

PDF to JPEG

This page shows how to convert a PDF file x.pdf into a JPEG image.

Are you sure you want to convert to JPEG?
PNG normally would be the better choice.

When converting vector graphics (like PDF) to bitmap images (like JPEG) you have to specify a resolution. This is the number of pixels per inch.

When creating JPEG files a quality parameter is required for the compromise between file size and image quality.
Typically the value is in the range 80...95.
Values below 25 and above 98 are not recommended.


Choice 1: Use gxhconvert

Procecure

gxhconvert -r=_resolution_ -q=_quality_ -o=jpg x.pdf

See the [gxhconvert manual] for a full description of the gxhconvert script.

Options

Option Purpose
-r=... Resolution in dpi (dots per inch).
-q=... Qualitiy value.
--interlaced
--jpeg‑progressive
Create progressive JPEG. The start of the file (data stream) allows to render the image in low quality, details for better quality follow. This is the equivalent to an interlaced PNG file.
--optimized
--jpeg‑optimize
Optimize (decrease) file size. Computation takes a little longer and uses more memory.
--web Shortcut for --interlaced --optimized.

Choice 2: Manual conversion

pdftoppm -r _resolution_ x.pdf pnmtojpeg -quality=_quality_ > x.jpg
← TOC    ↑ Home    PDF EPS SVG PNG JPEG ICO XPM

Related

Wiki: gxhconvert manual