how to save images from a pdf using python -
i want save pages in pdf document images using python. tried imagemagick,pypdf results not type of document(containing graphs,old scanned documents) .
when using imagemagick convert pdf png, 1 can specify density rasterize pdf @ high resolution. can resize down if want. example,
convert -density 300 image.pdf -resize wxh image.png
if pdf cmyk rather rgb, add -colorspace srgb right after -density 300 , before reading image.pdf.
if not enough increase density 600 , try again.
wxh final images size want.
if using imagemagick 7, replace convert magick
Comments
Post a Comment