Sha256: 61965eb402fce5d0e8c9ba919d22a7482631cb72df879dd843ea4056719b7191

Contents?: true

Size: 668 Bytes

Versions: 2

Compression:

Stored size: 668 Bytes

Contents

# encoding: utf-8
#
# These helpers will be familiar to Ruport users, and now are supported
# directly in Prawn.   Run the example to see how they work.
#
require File.expand_path(File.join(File.dirname(__FILE__),
                                   %w[.. example_helper]))

# Demonstrates some features stolen from Ruport::Formatter::PDF
Prawn::Document.generate("ruport.pdf") do
  move_down 50
  # TODO: Figure out where to set the y cursor to.
  stroke_horizontal_rule
  text "Hi there"
  pad(50) { text "I'm Padded" }
  text "I'm far away"
  stroke_horizontal_line 50, 100
  stroke_horizontal_line 50, 100, :at => 300
  stroke_vertical_line 300, 50, :at => 250
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
prawn-0.11.1 examples/graphics/ruport_style_helpers.rb
davebenvenuti-prawn-0.11.1.pre examples/graphics/ruport_style_helpers.rb