#1414·QuestPDF

Applying Text alignment as a TextStyle

Author: SethHarlaarCreated Mar 23, 2026Updated Mar 23, 2026

Is your feature request related to a problem? Please describe. We have a section of our PDF where the content is user generated via a rich text editor. We use a package called QuestPDF.HTML to add the content into the PDF, with some formatting in the HTML preserved.

The problem is that we would like to always justify the text, but this cannot be done because we are not using TextBlockDescriptor to insert the text. We apply some default text styles, but this does not currently allow for text alignment.

Describe the solution you'd like It would be nice to enable text alignment, (left/right/center/justify) to be applied as a default text style instead of only directly on a text block.

Describe alternatives you've considered The only way forward I can see as of now for us is to force users to justify the text themselves and then modify the QuestPDF.HTML package to properly enable text justification.

Edit: I don't actually think this would work without heavy refactoring of the package.