Recently we found Paul Madary's blog post about digital signatures in a Univeral Application (UWP) with iText 7, and we wanted to share it. Paul gracefully agreed to let us do that, and as a bonus we upgraded the code to be usable out-of-the-box with iText 7.1.3. The only change needed is the method SignDocumentSignature.

A big thank you to our Q3 top contributors!

There are so many people that contribute information to us in order to help improve our code, products and projects. We want to make sure that our top contributors are being recognized for the help they give and that they know how much we appreciate them.

Top menu

Breadcrumb

How to hyphenate text?

31st May 2016

admin-marketing

I generate a PDF file with iText in Java. My table columns have fixed widths. Text that is too long for one line is wrapped in the cell. But hyphenation is not used. The word "Leistungsscheinziffer" is shown as:

There are no Chunks in iText 7, we now use Text instances as atomic parts of Paragraphs. I've made an example based on your code (HyphenationExample); the word "Leistungsscheinziffer" is hyphenated in the resulting PDF: hyphenation_table.pdf.

If you want to set the hyphenation on the Paragraph level, you can do so, but this will only work for all subsequent Text objects that are added. It won't work for the content that is already stored inside the Paragraph. In other words: you need to create an empty Paragraph object and then add one or more Text objects:

Popular tags

Ready to use iText?

As always, if you have any technical questions, you can contact support with your valid support subscription or head over to one of our community support pages on Stack Overflow to see if your question has already been answered for our AGPL users.