Am 17.05.2019 um 15:54 schrieb Christopher Schultz:
It occurs to me that my code is doing more work than necessary to print paragraphs, and that maybe manual word-wrapping is not necessary. Are there any examples that show how to print a paragraph of text without having to compute the width of text and manually chop things up into lines? Or is that part of the price of PDF?
There is no feature in PDF that does automatic word wrap. Yes you have to do it yourself.
There is a class in the PDFBox source code, PlainTextFormatter, that can also do it, but it was designed for form fields. It is used in AppearanceGeneratorHelper. You'd have to copy the code, it is not public.
Tilman --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

