Class: Pdf::Reader::ExtractImages::Extractor

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf/reader/extract_images/extractor.rb

Instance Method Summary collapse

Constructor Details

#initialize(limit = Float::INFINITY) ⇒ Extractor

Returns a new instance of Extractor.



3
4
5
6
# File 'lib/pdf/reader/extract_images/extractor.rb', line 3

def initialize(limit = Float::INFINITY)
  @images = []
  @limit = limit
end

Instance Method Details

#page(page) ⇒ Object



8
9
10
11
12
# File 'lib/pdf/reader/extract_images/extractor.rb', line 8

def page(page)
  process_page(page, 0)
  @images.compact!
  @images
end