Last active
August 29, 2015 14:01
-
-
Save hiroyuki-sato/643f0435a8e8959ed14c to your computer and use it in GitHub Desktop.
Prawn question 5/19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'prawn' | |
require 'pp' | |
WIDTH = 708.66 | |
HEIGHT = 1000.63 | |
Prawn::Document.generate("hoge.pdf",:page_size => [WIDTH, HEIGHT]) do | |
text "a" * 1024 | |
indent_size = 60.to_f | |
size = bounds.right.to_f - bounds.left.to_f - indent_size | |
bounding_box([indent_size, cursor], :width => size, :height => 150) do | |
text "b" * 1024, :indent_paragraphs => 36 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment