Forum


Replies: 4   Views: 102
Using vertical text with textdirection on paragraphs

Posted by dpassola  · 22-12-2023 - 09:46

We want to create a table with vertical text heading, meaning that the text of the first row is viertical oriented to the right. We can achieve this by either, creating and html table and setting attributes dir="tbLrV", or creating a paragraph and setting the option "textDirection" to "tbLrV". Both ways do create vertical text inside the cell, but the text breaks line multiple times because the cell height is tiny by default. Is there a way to tell the cell to expand to the text inside, even if it is vertical text? Or do we have to set an specific height to the cells?

Posted by admin  · 22-12-2023 - 10:06

Hello,

MS Word doesn't include an autofit to set row height sizes automically based on the cell content. In this case we recommend you set a height size to the row.

Regards.

Posted by dpassola  · 08-02-2024 - 16:09

Thanks!, then, is there a function or tool that calculates the length of a text inside the document based on font-size and string-length?

Posted by admin  · 08-02-2024 - 18:51

Hello,

Sorry, but phpdocx doesn't include a method to calculate the length of a text content or element in the DOCX unless it's explicitly set.

Regards.

Posted by dpassola  · 12-02-2024 - 11:39

Allright, thank you!