I need to convert pdf files into image files (like: png (prefer), jpeg).
I used convert
(from the ImageMagick package) but it takes more than 4 seconds for a 2 page pdf file with only tables (something like an invoice), so this pdf is really light. I found out that convert
uses gs
to do it. If I do this with gs
, the result can be of better quality, and rendered faster.
So I have 3 questions:
- Should I use some specific flags in ghostscript package compilation process to make it work faster?
- What options for
gs
can help me get png or jpg files faster and with better quality? - Where can I find documentation about conversion from pdf to image formats?
Best Answer
You can check-out
pdfdraw
from mupdf (packagemupdf-tools
under Debian/Debian-derivatives).From its description:
Perhaps it is faster for your use case.
For example
mupdf
(a PDF viewer) is really fast (and consumes very little memory) for a lot of documents I tested it with.