Closed SoftCircuits closed 1 year ago
Try XTextFormatterEx: https://forum.pdfsharp.net/viewtopic.php?f=8&t=3147
Or XTextFormatterEx2: https://forum.pdfsharp.net/viewtopic.php?f=8&t=3192
XTextFormatter is meant to get you started. Add the features you need.
@TH-Soft Thanks. I'm happy to tweak the code myself when I have the source.
I found the
XTextFormatter
class. That's great. It makes it easy to print text blocks that require word wrap.But here's my question: What if I need to print multiple paragraphs? How can I determine where the bottom of the paragraph just printed is?
XTextFormatter.DrawString()
returns void, so it doesn't tell me how far it got vertically. And there are no overloads that accept a new Y position or rectangle. And the only similar property,LayoutRectangle
, simply contains the rectangle that I passed toDrawString()
.So how is it possible to print multiple paragraphs, one just below the previous?