Class: Poppler::Page

Inherits:
Object
  • Object
show all
Extended by:
GLib::Deprecatable
Defined in:
lib/poppler/page.rb,
lib/poppler/deprecated.rb

Instance Method Summary collapse

Instance Method Details

#find_text(text, options = nil) ⇒ Object



53
54
55
56
57
58
59
# File 'lib/poppler/page.rb', line 53

def find_text(text, options=nil)
  if options.nil?
    find_text_raw(text)
  else
    find_text_with_options(text, options)
  end
end

#find_text_rawObject



52
# File 'lib/poppler/page.rb', line 52

alias_method :find_text_raw, :find_text

#get_text(options = {}) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/poppler/page.rb', line 38

def get_text(options={})
  area = options[:area]
  style = options[:style]
  if area
    if style
      get_selected_text(style, area)
    else
      get_text_for_area(area)
    end
  else
    text
  end
end

#image_mappingObject



30
31
32
33
34
35
36
# File 'lib/poppler/page.rb', line 30

def image_mapping
  mappings = image_mapping_raw
  mappings.each do |mapping|
    mapping.page = self
  end
  mappings
end

#image_mapping_rawObject



29
# File 'lib/poppler/page.rb', line 29

alias_method :image_mapping_raw, :image_mapping

#text_layoutObject



20
21
22
23
24
25
26
27
# File 'lib/poppler/page.rb', line 20

def text_layout
  success, rectangles = text_layout_raw
  if success
    rectangles
  else
    nil
  end
end

#text_layout_rawObject



19
# File 'lib/poppler/page.rb', line 19

alias_method :text_layout_raw, :text_layout

#thumbnail_sizeObject



62
63
64
65
66
67
68
69
# File 'lib/poppler/page.rb', line 62

def thumbnail_size
  have_thumnbial, width, height = thumbnail_size_raw
  if have_thumnbial
    [width, height]
  else
    nil
  end
end

#thumbnail_size_rawObject



61
# File 'lib/poppler/page.rb', line 61

alias_method :thumbnail_size_raw, :thumbnail_size