Sha256: afb1b16aececd09737d44452b19c33011c8916061619e6a3a3f1ffcd13b63f77

Contents?: true

Size: 256 Bytes

Versions: 145

Compression:

Stored size: 256 Bytes

Contents

#!/usr/bin/env ruby

require "poppler"

if ARGV.size < 1
  puts "usage: #{$0} input.pdf"
  exit(-1)
end

input = ARGV.shift
input_uri = "file://#{File.expand_path(input)}"

doc = Poppler::Document.new(input_uri)
doc.each do |page|
  puts page.get_text
end

Version data entries

145 entries across 145 versions & 1 rubygems

Version Path
poppler-1.2.6 sample/pdf2text.rb
poppler-1.2.5-x86-mingw32 sample/pdf2text.rb
poppler-1.2.5 sample/pdf2text.rb
poppler-1.2.4-x86-mingw32 sample/pdf2text.rb
poppler-1.2.4 sample/pdf2text.rb
poppler-1.2.3-x86-mingw32 sample/pdf2text.rb
poppler-1.2.3 sample/pdf2text.rb
poppler-1.2.2-x86-mingw32 sample/pdf2text.rb
poppler-1.2.2 sample/pdf2text.rb
poppler-1.2.1-x86-mingw32 sample/pdf2text.rb
poppler-1.2.1 sample/pdf2text.rb
poppler-1.2.0-x86-mingw32 sample/pdf2text.rb
poppler-1.2.0 sample/pdf2text.rb
poppler-1.1.9-x86-mingw32 sample/pdf2text.rb
poppler-1.1.9 sample/pdf2text.rb
poppler-1.1.8-x86-mingw32 sample/pdf2text.rb
poppler-1.1.8 sample/pdf2text.rb
poppler-1.1.7 sample/pdf2text.rb
poppler-1.1.7-x86-mingw32 sample/pdf2text.rb
poppler-1.1.6-x86-mingw32 sample/pdf2text.rb