Class: PdflibWrapper::External::Pdf::Document
- Inherits:
-
Object
- Object
- PdflibWrapper::External::Pdf::Document
- Defined in:
- lib/pdflib_wrapper/external/pdf/document.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
Returns the value of attribute document.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(pdf, filepath, opts = {}) ⇒ Document
constructor
A new instance of Document.
- #open_page(page_number = 1, opts = {}) ⇒ Object
Constructor Details
#initialize(pdf, filepath, opts = {}) ⇒ Document
Returns a new instance of Document.
6 7 8 9 10 11 12 |
# File 'lib/pdflib_wrapper/external/pdf/document.rb', line 6 def initialize(pdf, filepath, opts={}) #TODO: support opts key_values = [:password] singles = [] @pdf = pdf @document = @pdf.open_pdi_document( filepath, OptionListMapper.('', key_values, singles, opts) ) end |
Instance Attribute Details
#document ⇒ Object
Returns the value of attribute document.
5 6 7 |
# File 'lib/pdflib_wrapper/external/pdf/document.rb', line 5 def document @document end |
Instance Method Details
#close ⇒ Object
19 20 21 22 |
# File 'lib/pdflib_wrapper/external/pdf/document.rb', line 19 def close #TODO: support opts @pdf.close_pdi_document(@document) end |