Created
April 29, 2012 08:49
-
-
Save mkastner/2547562 to your computer and use it in GitHub Desktop.
When using column_box hyphenation character is being redered in last line of parargraphs
This file contains hidden or 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' | |
class Hyphen < Prawn::Document | |
def initialize | |
super(:margin => [10,10,10,10], :page_size => 'A4') | |
column_box([0, cursor], columns: 2, width: bounds.width) do | |
text "This is a test where the very important Hy#{Prawn::Text::SHY}phe#{Prawn::Text::SHY}na#{Prawn::Text::SHY}tion works fine here, but which contains Hy#{Prawn::Text::SHY}phe#{Prawn::Text::SHY}na#{Prawn::Text::SHY}tion\n in the last line of the paragraph Hy#{Prawn::Text::SHY}phe#{Prawn::Text::SHY}na#{Prawn::Text::SHY}ted\n" | |
bounds.move_past_bottom | |
text "second column" | |
end | |
end | |
end | |
Hyphen.new.render_file('hyphentest.pdf') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment