Sha256: 17f0a3a6e695c310002627256a71afeabd2b5d1dbe82bb369abc464b94daff09

Contents?: true

Size: 466 Bytes

Versions: 2

Compression:

Stored size: 466 Bytes

Contents

#!/usr/bin/env ruby

require_relative '../lib/pdfium'
require 'pathname'


path = Pathname.new(__FILE__).dirname.join('pdfs','example_images.pdf')

# guide = PDFium::Document.new( path )
# `rm /tmp/images/*`
# page = guide.page_at(0)


# path.write page.as_image(height: 120).data('jpg')

data = path.read
puts data.length
pdf = PDFium::Document.from_memory(data)

puts pdf.page_count

# page.each_image do |img|
#     img.save("/tmp/images/#{img.index}.png")
# end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pdfium-0.0.2 test/debug.rb
pdfium-0.0.1 test/debug.rb