3

Possible Duplicate:
Converting a PDF to PNG

Staff there any open source library in C can convert PDF to JPEG. thank you

Community
  • 1
  • 1
  • 1
    You don't want to convert PDF to JPEG. JPEG is only for photographs, and anything that isn't a photograph that is stored as JPEG has ugly compression artifacts. You want to convert to PNG. – Andy Lester Dec 01 '12 at 18:19

1 Answers1

1

mupdf internally uses libfitz (pretty small) and supports writing png (it only decodes jpeg - at least by default) but you can convert to jpeg using mtpixel (part of mtcelledit), convert (part of imagemagic)

mupdf example:
http://git.ghostscript.com/?p=mupdf.git;a=blob;f=doc/example.c

png2jpg:
http://src.gnu-darwin.org/ports/games/torcs/work/torcs-1.3.0/src/misc/png2jpg/png2jpg.c

edit: if you don't mind having cairo as a dependency (its pretty large these days) libpoppler will work too, but mupdf is smaller and easy to hack at.

technosaurus
  • 7,676
  • 1
  • 30
  • 52