Now that PDFDocument is available, it occurred to me that Xojo does not include a simple way to build a document. For example, if I wanted to construct a document the way I would in a word processor, I’d add sections, paragraphs, and tables, and each element would have settings that controlled how and where it appeared, would automatically wrap, include optional widow control for paragraphs, headers/footers for sections, etc.
To take a simple case, how would you easily create this paragraph in PDFDocument?
This is an example paragraph. It does not have any fancy features like indenting or outdenting but what it does have is styling. For example, that italicized word and bolding that starts in the middle of a sentence and wraps around to subsequent lines with additional text appearing after it.
Before I take the plunge and build such a thing, I wonder if there is already a class or module that does this?
My (limited) understanding is that Xojo’s PDF implementation is at a very low level, as it is integrated into the Graphics classes. So I wouldn’t expect anything fancy to have already been built. You’re probably the first.
For that you need to have a very precise Stringwidth function, so you can process chunks of text, break lines and switch styles.
I don’t expect PDFDocument does that yet.