Copy link to clipboard
Copied
Somebody has an idea how to get how many characters to fill out a textFrame?
Even if I have an empty textFrame or filled with some characters...
Thanks.
Solved some time ago, using this:
Copy link to clipboard
Copied
Would that be i or W ?
Copy link to clipboard
Copied
That's exactly the point. Filling the textFrame with placeholder text, with
the paraStyle applied into it.
Copy link to clipboard
Copied
If you don't know what you are filling with you can't calculate it.
I think there is a least one thread here about finding the contents of the placeholder text. You can search for it.
Once you get past that problem it's still going to be really tough to do the calculation. Alignment and hyphenation are things to consider.
I think you only chance of anything accurate is a divide and conquer trial and error.
For a starting figure you can measure an average size letter "a" and calculate how many of those would fit in and then apply your devide and conquer.
HTH
Trevor
Copy link to clipboard
Copied
Ok. Currently I'm filling with placeholder, then calculate how many chars
are inserted, and then, finally, I remove what was placed.
I just asking to put more heads thinking about.
Thank you so much!
Copy link to clipboard
Copied
@Trevor
If you don't know what you are filling with you can't calculate it.
I can't agree more.
I have been involved with a client where people constantly claimed for such a pre-calculation feature. That way the "exact" numbers of characters could be indicated upfront in their CMS. I tried thousand times to explain why it didn't make sense with few to no success
Copy link to clipboard
Copied
Yep even with a monspaced font it would be pretty much impossible because one can't no where the spaces are going to be that will trigger the new line.
I hope you were paid by the hour for your explanations.
Copy link to clipboard
Copied
No the problem is that people are so attached to the idea they won't just listen. Believe me, I could explain to the same person on Monday and he will claim for it on Tuesday. Explained on Tuesday then required on Wednesday and etc.
In fact it was more about changes in the process that people disliked.
Copy link to clipboard
Copied
Yes, I know about all these problems.
I don't need the exact number. But, understood.
Thank you all.
Copy link to clipboard
Copied
Solved some time ago, using this: