#!/usr/pkg/bin/ruby193

require 'rubygems'
require 'pdf/reader'

if ARGV.empty?
  browser = PDF::Reader.new($stdin)
else
  browser = PDF::Reader.new(ARGV[0])
end
browser.pages.each do |page|
  puts page.text
end
