RUBY: Extract text from pdf

require 'rubygems'
require 'pdf/toolkit'


my_pdf = PDF::Toolkit.open("testpdf.pdf")
text = my_pdf.to_text.read
puts text

"You're entering a world of pain."