Class: Quartz::PDFPage
- Inherits:
-
Object
- Object
- Quartz::PDFPage
- Defined in:
- lib/rubyquartz/pdf_page.rb
Constant Summary collapse
- @@BoxTypeToNumber =
{ :media => 0, :crop => 1, :bleed => 2, :trim => 3, :art => 4, }
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Instance Method Summary collapse
-
#initialize(options) ⇒ PDFPage
constructor
A new instance of PDFPage.
- #page_box(type) ⇒ Object
Constructor Details
#initialize(options) ⇒ PDFPage
Returns a new instance of PDFPage.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/rubyquartz/pdf_page.rb', line 38 def initialize() @document = [:document] # Keep a reference to this since the CGPDFPageRef refers to its CGPDFDocumentRef but doesn't retain it. index = [:index] if @document && index _initialize_with_document_at_index(@document, index) return end raise "Cannot determine how to create PDF page from given options" end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
28 29 30 |
# File 'lib/rubyquartz/pdf_page.rb', line 28 def document @document end |
Instance Method Details
#page_box(type) ⇒ Object
49 50 51 |
# File 'lib/rubyquartz/pdf_page.rb', line 49 def page_box(type) _page_box(@@BoxTypeToNumber[type]) end |