You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lets say we have a container "ex. cell" that has specific dimension, and we want to put a text that is bigger than the cell dimension ,
normally, putting the bigger text inside cell will make the cell height to expand until it contains all the text,
in (iTextSharp) if I set this cell height as (Fixed Height), only part of the text (that the cell height can handle) will show, the remaining text will not show , and the cell height will not expand , see the image:
I tried (MaxHeight) without success, it throws exception.
so how can I achieve this in QuestPdf?
The text was updated successfully, but these errors were encountered:
You should be able to achieve what you want by using a combination of MaxHeight and StopPaging. You may also need WrapAnywhere for results to show the last partial word ("hav"), but that will only work correctly if are rendering a single line of text; with 2 lines or more, I believe WrapAnywhere will cause words to break in lines 1 and 2 as well, which is probably not something you want.
There is a discussion around this topic in #742, and from what I gather future versions (after 2024.3.0) may offer better support for text truncation.
Indeed, the 2024.3.0-rc2 release allows you to set the maximum number of lines that should be visible. If text requires more space, it is truncated with the ellipsis symbol.
Lets say we have a container "ex. cell" that has specific dimension, and we want to put a text that is bigger than the cell dimension ,
normally, putting the bigger text inside cell will make the cell height to expand until it contains all the text,
in (iTextSharp) if I set this cell height as (Fixed Height), only part of the text (that the cell height can handle) will show, the remaining text will not show , and the cell height will not expand , see the image:
I tried (MaxHeight) without success, it throws exception.
so how can I achieve this in QuestPdf?
The text was updated successfully, but these errors were encountered: