Class: Quartz::PDFDocument
- Inherits:
-
Object
- Object
- Quartz::PDFDocument
- Defined in:
- lib/rubyquartz/pdf_document.rb,
ext/pdf_document.c
Instance Method Summary collapse
- #[](index) ⇒ Object
-
#initialize(options) ⇒ PDFDocument
constructor
A new instance of PDFDocument.
- #size ⇒ Object
Constructor Details
#initialize(options) ⇒ PDFDocument
Returns a new instance of PDFDocument.
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/rubyquartz/pdf_document.rb', line 29 def initialize() if data = [:data] _initialize_with_data(data) return end if path = [:path] _initialize_with_path(path) return end # TODO: Add various other creation types raise "Cannot determine how to create PDF document from given options" end |
Instance Method Details
#[](index) ⇒ Object
43 44 45 |
# File 'lib/rubyquartz/pdf_document.rb', line 43 def[](index) PDFPage.new(:document => self, :index => index) end |
#size ⇒ Object
77 78 79 80 |
# File 'ext/pdf_document.c', line 77
static VALUE pdf_document_get_count(VALUE self)
{
return INT2NUM(CGPDFDocumentGetNumberOfPages(pdf_document_get(self)));
}
|