Sha256: 0ad53493c31c89f5d517dc0af292bffa06ce9d11a96d2046afdd2b8043dca8c4

Contents?: true

Size: 545 Bytes

Versions: 6

Compression:

Stored size: 545 Bytes

Contents

# encoding: utf-8
#
# An early example of basic text generation at absolute positions.
# Mostly kept for nostalgia.
#
require "#{File.dirname(__FILE__)}/../example_helper.rb"

Prawn::Document.generate "indent_paragraphs.pdf" do |pdf|
  hello = "hello " * 50
  world = "world " * 50
  pdf.text(hello + "\n" + world, :indent_paragraphs => 60)

  pdf.move_cursor_to(pdf.font.height)
  pdf.text(hello + "\n" + world, :indent_paragraphs => 60)

  pdf.move_cursor_to(pdf.font.height * 3)
  pdf.text(hello + "\n" + world, :indent_paragraphs => 60)
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
piglop-prawn-0.10.2.3 examples/text/indent_paragraphs.rb
piglop-prawn-0.10.2.2 examples/text/indent_paragraphs.rb
piglop-prawn-0.10.2.1 examples/text/indent_paragraphs.rb
prawn-core-0.8.4 examples/text/indent_paragraphs.rb
prawn-graph-0.0.2 vendor/prawn-core/examples/text/indent_paragraphs.rb
prawn-graph-0.0.1 vendor/prawn-core/examples/text/indent_paragraphs.rb