This is a migrated thread and some comments may be shown as answers.

Is there a way to know if the text inside a text box which is passed from data source, wraps after the report is rendered as a pdf?

1 Answer 94 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Silambholi
Top achievements
Rank 1
Silambholi asked on 14 Dec 2020, 06:34 PM
I am having a text box inside the details section of my report. Value for this text box is passed by the data source during runtime. This report is rendered as a pdf. I don't want the text box to wrap the content, so right now I am using the character count (to determine if it wraps) to show or hide the text box. I would like to know if there is a way to identify if the text inside the box is wrapped after rendered as a pdf?

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 17 Dec 2020, 01:52 PM

Hello Silambholi,

I noticed that you have asked the same question also in a support ticket. I will copy my answer also in this thread for the benefit of our community:

You may disable text wrapping by setting either of the TextBox properties CanGrow or TextWrap to False. By default they are True. This will result in cutting the text, i.e. displaying only the content that fits in the TextBox design-time size. Note that when TextWrap is False, there will be only one row generated in the TextBox irrespective of its height. With CanGrow False, all the height will be occupied, hence there may be more than one line of text.

Regarding your particular question, I'm afraid there is no way to predict whether, in PDF or any other rendering format, the TextBox content will fit within the design-time TextBox size. Whether the text should be wrapped is decided run-time, during rendering in the particular format, and this information is not available before.

Regards,
Todor
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Silambholi
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or