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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -