File: canvas_sets_y_to_0.rb

package info (click to toggle)
ruby-prawn 1.0.0~rc1%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,248 kB
  • sloc: ruby: 17,499; sh: 44; makefile: 17
file content (15 lines) | stat: -rw-r--r-- 508 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# As of 7e94d25828021732f7872934cb91430ef798cd86, Document#canvas
# sets pdf.y to 0 after executing a block, which is probably not useful for 
# anyone.  It should retain the y position present at the end of the block.
#
# This was resolved in 998a5c3fad40c9e0a79e1468e3a83815ed948a74 [#88]
#
$LOAD_PATH << File.join(File.dirname(__FILE__), '..', '..','lib')
require "prawn/core"

Prawn::Document.generate("canvas_sets_y_to_0.pdf") do
  
  canvas { text "blah" }
 
  text "Here's my sentence. by satoko"
end