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-3.1.8-x64-mingw32 sample/pdf2text.rb
poppler-3.1.8-x86-mingw32 sample/pdf2text.rb
poppler-3.1.8 sample/pdf2text.rb
poppler-3.1.7-x64-mingw32 sample/pdf2text.rb
poppler-3.1.7-x86-mingw32 sample/pdf2text.rb
poppler-3.1.7 sample/pdf2text.rb
poppler-3.1.6-x64-mingw32 sample/pdf2text.rb
poppler-3.1.6-x86-mingw32 sample/pdf2text.rb
poppler-3.1.6 sample/pdf2text.rb
poppler-3.1.5-x64-mingw32 sample/pdf2text.rb
poppler-3.1.5-x86-mingw32 sample/pdf2text.rb
poppler-3.1.4-x64-mingw32 sample/pdf2text.rb
poppler-3.1.4-x86-mingw32 sample/pdf2text.rb
poppler-3.1.4 sample/pdf2text.rb
poppler-3.1.3-x64-mingw32 sample/pdf2text.rb
poppler-3.1.3-x86-mingw32 sample/pdf2text.rb
poppler-3.1.3 sample/pdf2text.rb
poppler-3.1.2-x64-mingw32 sample/pdf2text.rb
poppler-3.1.2-x86-mingw32 sample/pdf2text.rb
poppler-3.1.2 sample/pdf2text.rb