class PDF::Inspector::Page

Attributes

pages[R]

Public Class Methods

new() click to toggle source
# File lib/pdf/inspector/page.rb, line 6
def initialize
  @pages = []
end

Public Instance Methods

begin_page(params) click to toggle source
# File lib/pdf/inspector/page.rb, line 10
def begin_page(params)
  @pages << {:size => params[:MediaBox][-2..-1], :strings => []}
end
show_text(*params) click to toggle source
# File lib/pdf/inspector/page.rb, line 14
def show_text(*params)
  @pages.last[:strings] << params[0]
end
show_text_with_positioning(*params) click to toggle source
# File lib/pdf/inspector/page.rb, line 18
def show_text_with_positioning(*params)      
  # ignore kerning information
  @pages.last[:strings] << params[0].reject { |e| Numeric === e }.join
end