Hello,
is there a possibility to hint prefered position for a line break? E.g. I have to following text:
"Family Firstname1 Lastname1 and Firstname2 Lastname2"
If possiblle I want to have the line breaks before or after the "and". I can't use between Firstname and Lastname because sometimes they are so long that they don't fit in the line. Then the break should be there but whenever possible not.
Thank You
Jascha
Last edit: Jascha 2014-10-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This would be a possibility, but its a lot of work. I would have to implement my own line break logic. Is there nothing in tcpdf which can achive this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
is there a possibility to hint prefered position for a line break? E.g. I have to following text:
"Family Firstname1 Lastname1 and Firstname2 Lastname2"
If possiblle I want to have the line breaks before or after the "and". I can't use between Firstname and Lastname because sometimes they are so long that they don't fit in the line. Then the break should be there but whenever possible not.
Thank You
Jascha
Last edit: Jascha 2014-10-13
I'd use something like GetStringWidth() to find the length of the text, then manually add the line break based on that.
See: http://www.tcpdf.org/doc/code/classTCPDF.html#a8075c1f04b6fbddc957cff786c4b16d9
This would be a possibility, but its a lot of work. I would have to implement my own line break logic. Is there nothing in tcpdf which can achive this?