Skip to content

Instantly share code, notes, and snippets.

@hiroyuki-sato
Last active August 29, 2015 14:01
Show Gist options
  • Save hiroyuki-sato/643f0435a8e8959ed14c to your computer and use it in GitHub Desktop.
Save hiroyuki-sato/643f0435a8e8959ed14c to your computer and use it in GitHub Desktop.
Prawn question 5/19
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