Class: EideticPDF::PdfObjects::PdfFile
- Inherits:
-
Object
- Object
- EideticPDF::PdfObjects::PdfFile
- Defined in:
- lib/epdfo.rb
Overview
root of object tree representing a PDF document
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#trailer ⇒ Object
readonly
Returns the value of attribute trailer.
Instance Method Summary collapse
-
#initialize ⇒ PdfFile
constructor
A new instance of PdfFile.
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
860 861 862 |
# File 'lib/epdfo.rb', line 860 def body @body end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
860 861 862 |
# File 'lib/epdfo.rb', line 860 def header @header end |
#trailer ⇒ Object (readonly)
Returns the value of attribute trailer.
860 861 862 |
# File 'lib/epdfo.rb', line 860 def trailer @trailer end |
Instance Method Details
#to_s ⇒ Object
868 869 870 871 872 873 874 875 876 877 878 879 |
# File 'lib/epdfo.rb', line 868 def to_s xref_table = XRefTable.new xref_sub_section = XRefSubSection.new xref_table << xref_sub_section s = @header.to_s @body.write_and_xref(s, xref_sub_section) @trailer.xref_table_start = s.length @trailer.xref_table_size = xref_sub_section.size s << xref_table.to_s s << @trailer.to_s end |