Class: PDF::Inspector::Page
Instance Attribute Summary collapse
Instance Method Summary
collapse
analyze, analyze_file, parse
Constructor Details
#initialize ⇒ Page
Returns a new instance of Page.
6
7
8
|
# File 'lib/pdf/inspector/page.rb', line 6
def initialize
@pages = []
end
|
Instance Attribute Details
#pages ⇒ Object
Returns the value of attribute pages.
4
5
6
|
# File 'lib/pdf/inspector/page.rb', line 4
def pages
@pages
end
|
Instance Method Details
#begin_page(params) ⇒ Object
10
11
12
|
# File 'lib/pdf/inspector/page.rb', line 10
def begin_page(params)
@pages << {:size => params[:MediaBox][-2..-1], :strings => []}
end
|
#show_text(*params) ⇒ Object
14
15
16
|
# File 'lib/pdf/inspector/page.rb', line 14
def show_text(*params)
@pages.last[:strings] << params[0]
end
|
#show_text_with_positioning(*params) ⇒ Object
18
19
20
21
|
# File 'lib/pdf/inspector/page.rb', line 18
def show_text_with_positioning(*params)
@pages.last[:strings] << params[0].reject { |e| Numeric === e }.join
end
|