Replies: 2 comments 2 replies
-
|
Thinreports uses Prawn to generate PDFs, but there is no option in Prawn to disable this behavior (hyphenation). Unfortunately, I think the only current workaround is to replace the hyphen with a visually similar character such as a non-breaking hyphen. report.item(:text).value(text.gsub("\u002d", "\u2011")) |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
If you like, you can try the prawn-disable_word_break gem for an alternative solution. # Gemfile
gem 'thinreports'
+ gem 'prawn-disable_word_break' |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Thank you for providing such a powerful and helpful PDF generator.
We run a system with the thinreports 0.10.2 to create PDF files.
We have encountered a same problem with the issue "Unexpected new line after hyphen" discussed here; thinreports/thinreports-generator#50.
I understand the cause, but there is no solution found in the discussion.
What we can do as a workaround at this moment is to replace hyphens with other visually similar characters.
I would appreciate if you could give me a solution to the problem or any better workaround.
Beta Was this translation helpful? Give feedback.
All reactions