Created
May 21, 2013 14:50
-
-
Save songjiayang/5620394 to your computer and use it in GitHub Desktop.
pdf to png
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parse_to_png(pdf_file) | |
pdf = Magick::ImageList.new(pdf_file) | |
pdf.each_with_index do |image,index| | |
thumb = image.scale(1024, 768) | |
thumb.write("pngs/#{index.to_s}.png") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solution: PDF to Image Converter
Detail: PDF to PNG Conversion Guide