Sha256: ad7c4a1986eb5efe953c64b6d94b731d510bd7e681fe60c46bf7cb3dbd5d0dae

Contents?: true

Size: 638 Bytes

Versions: 5

Compression:

Stored size: 638 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.
#
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
require "prawn"

# 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

5 entries across 5 versions & 2 rubygems

Version Path
kavu-prawn-core-0.4.100 examples/graphics/ruport_style_helpers.rb
kavu-prawn-core-0.4.99 examples/graphics/ruport_style_helpers.rb
prawn-0.3.0 examples/graphics/ruport_style_helpers.rb
prawn-0.4.0 examples/graphics/ruport_style_helpers.rb
prawn-0.4.1 examples/graphics/ruport_style_helpers.rb