Sha256: 76ea412dd58e4d0ac544337b2438bff2de5a81e2b525c2ae8cf95d0b14b26372

Contents?: true

Size: 303 Bytes

Versions: 36

Compression:

Stored size: 303 Bytes

Contents

#!/usr/bin/env ruby
# coding: utf-8

# Extract all text from a single PDF

require 'rubygems'
require 'pdf/reader'

filename = File.expand_path(File.dirname(__FILE__)) + "/../spec/data/cairo-unicode.pdf"

PDF::Reader.open(filename) do |reader|
  reader.pages.each do |page|
    puts page.text
  end
end

Version data entries

36 entries across 35 versions & 3 rubygems

Version Path
pdf-reader-2.13.0 examples/text.rb
pdf-reader-2.12.0 examples/text.rb
pdf-reader-2.11.0 examples/text.rb
pdf-reader-2.10.0 examples/text.rb
pdf-reader-2.9.2 examples/text.rb
pdf-reader-2.9.1 examples/text.rb
pdf-reader-2.9.0 examples/text.rb
pdf-reader-2.8.0 examples/text.rb
pdf-reader-2.7.0 examples/text.rb
pdf-reader-2.6.0 examples/text.rb
pdf-reader-2.5.0 examples/text.rb
pdf-reader-2.4.2 examples/text.rb
pdf-reader-2.4.1 examples/text.rb
pdf-reader-2.4.0 examples/text.rb
pdf-reader-2.3.0 examples/text.rb
pdf-reader-2.2.1 examples/text.rb
embulk-input-druginfo_interview_form-0.1.0 vendor/bundle/ruby/2.4.0/gems/pdf-reader-2.2.0/examples/text.rb
embulk-input-druginfo_interview_form-0.1.0 vendor/bundle/ruby/2.5.0/gems/pdf-reader-2.2.0/examples/text.rb
pdf-reader-2.2.0 examples/text.rb
pdf-reader-2.1.0 examples/text.rb