Option to define wrapmode="CHAR" within a template #1159
Description
Please explain your intent
I am using fpdf2 to produce reports using verified translations in multiple languages, using the template features to define the report layout. One of my collaborators validating our Japanese language report advised that inappropriate line breaks were occurring. Investigating this, I see that is because there are not spaces in this language, and wrapping should be by character not word.
I see there is functionality to optionally support word wrapping based on character instead of word when using the non-template approach to pdf construction with multicell()
or write()
using the option wrapmode="CHAR"
(as per fpdf2 documentation). However, I don't believe this is configurable when using a template to define the PDF layout, or if it is I don't believe this is documented.
Describe the solution you'd like
Allowing the option to set wrapmode="CHAR"
within a template, or providing guidance on how to achieve this effect would be greatly appreciated and very useful. This could be another parameter, e.g. like 'align' or 'rotate'. It need only be used for the relevant text formatting types, and have a default of 'word' but option to set otherwise (i.e. to 'CHAR', for scripts like Chinese and Japanese, etc).
I'm hopeful this could be relatively straightforward to implement, given the existing technical functionality to do this (which is great, thank you!).