class PDFium::PageList
A list of Page objects associated with a Document.
Public Class Methods
new(document)
click to toggle source
Create a new listing from the given document. Not normally called directly, is called internally by Document#pages
# File lib/pdfium/page_list.rb, line 10 def initialize(document) @document=document end
Public Instance Methods
[](index)
click to toggle source
Returns a Page instance for the given number. If the given page_number is not valid, an ArgumentError will be raised.
note Subsequent calls to this function will return different Page instances.
# File lib/pdfium/page_list.rb, line 31 def [](index) @document.page_at(index) end
count()
click to toggle source
Returns the number of pages on the document
# File lib/pdfium/page_list.rb, line 23 def count @document.page_count end
each(&block)
click to toggle source
Calls block once for each page on the document, yielding the current page After the page is yielded, Page#unload will be automatically called.
note Subsequent calls to this function will return different Page instances.
# File lib/pdfium/page_list.rb, line 18 def each(&block) @document.each_page(&block) end