Class: PDF::Reader::MarkupPage
- Inherits:
-
Object
- Object
- PDF::Reader::MarkupPage
- Defined in:
- lib/pdf/reader/markup.rb,
lib/pdf/reader/markup/version.rb,
lib/pdf/reader/markup/page_bold_italic_receiver.rb
Overview
:doc:
Defined Under Namespace
Classes: PageBoldItalicReceiver
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the plaintext content of the page.
-
#formatted_lines ⇒ Object
readonly
Returns the formatted lines for the page as an array.
-
#lines ⇒ Object
readonly
Returns the plaintext lines for the page as an array.
-
#markup ⇒ Object
readonly
Returns the formatted content of the page.
Instance Method Summary collapse
-
#initialize(page) ⇒ MarkupPage
constructor
Wrapper function for walking the page with the Reader::MarkupPage::PageBoldItalicReceiver receiver.
Constructor Details
#initialize(page) ⇒ MarkupPage
Wrapper function for walking the page with the Reader::MarkupPage::PageBoldItalicReceiver receiver
29 30 31 32 33 34 35 36 |
# File 'lib/pdf/reader/markup.rb', line 29 def initialize(page) receiver = PageBoldItalicReceiver.new() page.walk(receiver) @content = receiver.content @markup = receiver.markup @lines = @content.lines.to_a @formatted_lines = @markup.lines.to_a end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the plaintext content of the page
10 11 12 |
# File 'lib/pdf/reader/markup.rb', line 10 def content @content end |
#formatted_lines ⇒ Object (readonly)
Returns the formatted lines for the page as an array
15 16 17 |
# File 'lib/pdf/reader/markup.rb', line 15 def formatted_lines @formatted_lines end |
#lines ⇒ Object (readonly)
Returns the plaintext lines for the page as an array
20 21 22 |
# File 'lib/pdf/reader/markup.rb', line 20 def lines @lines end |
#markup ⇒ Object (readonly)
Returns the formatted content of the page
24 25 26 |
# File 'lib/pdf/reader/markup.rb', line 24 def markup @markup end |