What is the text of pageheights
Posted: Sat Jun 08, 2019 4:26 pm
Is there a function to identify the text appearing in a field after a scroll using the pageHeights ?
Hello,
Here is my problem:
I use a field with fixedLineHeight=false. In this field the text is very long and the user can change the textSize of the words, in different locations. Now to print this text (in fact to create a pdf file) I use a repeat with the lines of the pageheights of this field. It works well for the firsts lines appearing in the top of each page, but not for the last line appearing in the page. Because of the height of each line, the last one appears truncked and some time a line appears at the bottom of a page (not very truncked) and at the top of the next page.
To solve this problem I need a function (but I don't know if existing) wich indicates what is the text appearing in a page. If I know this text I can use the formattedHeight of this text and determine if I must ajust the height of the field so the truncked line does not appear at the bottom of the field.
Without such a function, it is possible, but not very fun, to use a loop that looks like
repeat with ANumberWord =1 to the number of words of my field
if the formattedHeight of word 1 to ANumberWord of my field >the pageHeights of this page
then set the height of my field smaller
end repeat
(I can send an script if necessary)
Have you another solution ?
Thanks for all help
Jean-Marc from Nice (France)
Hello,
Here is my problem:
I use a field with fixedLineHeight=false. In this field the text is very long and the user can change the textSize of the words, in different locations. Now to print this text (in fact to create a pdf file) I use a repeat with the lines of the pageheights of this field. It works well for the firsts lines appearing in the top of each page, but not for the last line appearing in the page. Because of the height of each line, the last one appears truncked and some time a line appears at the bottom of a page (not very truncked) and at the top of the next page.
To solve this problem I need a function (but I don't know if existing) wich indicates what is the text appearing in a page. If I know this text I can use the formattedHeight of this text and determine if I must ajust the height of the field so the truncked line does not appear at the bottom of the field.
Without such a function, it is possible, but not very fun, to use a loop that looks like
repeat with ANumberWord =1 to the number of words of my field
if the formattedHeight of word 1 to ANumberWord of my field >the pageHeights of this page
then set the height of my field smaller
end repeat
(I can send an script if necessary)
Have you another solution ?
Thanks for all help
Jean-Marc from Nice (France)