Sha256: 7673441bbc3a6e0f58da8e86f43449a697a5504779c457f2b9f5ac392c7b052a
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
# encoding: utf-8 # # <strong>NOTE: This feature is currently not working correctly</strong> # # Sometimes free flowing text might look ugly, specially when a paragraph is # split between two pages. Using a positioned text box just to overcome this # nuisance is not the right choice. # # You probably want to use the <code>group</code> method instead. It will try # to render the block within the current page. If the content would fall to a # new page it just renders everything on the following page. If the block cannot # be executed on a single blank page a <code>CannotGroup</code> exception will # be raised. # # So if you can split your text blocks in paragraphs you can have every # paragraph contained on a single page. # require File.expand_path(File.join(File.dirname(__FILE__), %w[.. example_helper])) filename = File.basename(__FILE__).gsub('.rb', '.pdf') Prawn::Example.generate(filename) do move_cursor_to 80 text "Let's move to the end of the page so that you can see group in action." group do text "This block of text was too big to be rendered on the bottom of the " + " previous page. So it was rendered entirely on this new page. " + " _ " * 200 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
prawn-0.15.0 | manual/text/group.rb |