Skip to content

Instantly share code, notes, and snippets.

@songjiayang
Created May 21, 2013 14:50
Show Gist options
  • Save songjiayang/5620394 to your computer and use it in GitHub Desktop.
Save songjiayang/5620394 to your computer and use it in GitHub Desktop.
pdf to png
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
@AdeleB
Copy link

AdeleB commented Sep 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment