Class: Poppler::Page

Inherits:
Object show all
Defined in:
lib/tagen/poppler.rb

Overview

Additional Method List


  • #wh: _alias from size_

Instance Method Summary collapse

Instance Method Details

#cairo_contextCairo::Context

used when ‘cairo’ is installed

Returns:



37
38
39
40
41
42
43
44
# File 'lib/tagen/poppler.rb', line 37

def cairo_context
	require "cairo"
	require_relative "cairo"
	surface = Cairo::ImageSurface.new(*self.wh)
	ctx = Cairo::Context.new(surface)
	render(ctx)
	ctx
end

#hObject

get height



32
# File 'lib/tagen/poppler.rb', line 32

def h; size[1] end

#wObject

get width



30
# File 'lib/tagen/poppler.rb', line 30

def w; size[0] end