Sha256: 5a21821aec9e911588ee143fc706cf5c2f1dfb28ecc5c89ebcf50fb4e8fdfecf
Contents?: true
Size: 619 Bytes
Versions: 2
Compression:
Stored size: 619 Bytes
Contents
#!/usr/bin/env ruby require_relative '../lib/pdfium' require 'pathname' puts "Waiting for profiler attachment (PID: #{Process.pid})\nPress enter to continue" gets path = Pathname.new(__FILE__).dirname.join('pdfs','example_images.pdf').to_s guide = PDFium::Document.new( path ) `rm /tmp/images/*` page = guide.page_at(0) page.each_image do |img| img.save("/tmp/images/#{img.index}.png") end # count = 0 # pdf.bookmarks.each do | bm | # count +=1 # print count.to_s + " " # puts bm.title # end # pdf.each_page do | page | # page.width # end # GC.start(full_mark: true, immediate_sweep: true)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pdfium-0.0.2 | test/profile.rb |
pdfium-0.0.1 | test/profile.rb |