lib/rabbit/renderer/print/cairo.rb in rabbit-2.0.2 vs lib/rabbit/renderer/print/cairo.rb in rabbit-2.0.3
- old
+ new
@@ -83,17 +83,25 @@
cairo_poppler_available?
end
private
def init_paper
- @page_width = @paper_width || A4_HEIGHT
- @page_height = @paper_height || A4_WIDTH
+ default_width_mm = 360
+ default_height_mm = 270
+ @page_width = @paper_width || default_width_mm
+ @page_height = @paper_height || default_height_mm
end
def init_color
super
@foreground = make_color("black")
@background = make_color(@background_color)
+ end
+
+ def init_dpi
+ super
+ @x_dpi = 300
+ @y_dpi = 300
end
def create_context(output=nil)
surface = find_surface(filename, output)
surface.set_fallback_resolution(@x_dpi, @y_dpi)