Hey All,
I basically have templates that work with labels to output a letter to .pdf format, and I'm struggling with the best way to know when I need to cut off the text to end a section, and start a new one.
For instance, if I have three pages of text in a string, what would be the best way to calculate where the cut-off point is for each page given the font size, label size for the page body, etc.
I'm sure this is basic and frequently asked, but I'm new to DynamicPDF.
Knowing How to Fit Text to a Section
Re: Knowing How to Fit Text to a Section
Support · Apr 24, 2006Hello,
Yes, this can be done regardless of the amount of text you have in a string.
While building the document you will first add a TextArea to the page containing all your text and with a defined height and width equal to the amount of space you actually have on the page. Then you could check that TextArea to see if it had any overflow, if so then create a new page and add the overflow to that page. You will continue this process until you get to a page that does not contain anymore overflow (you now know that this is the last page of your document).
Following is the link to the Text Continuation
topic in the Help Documentation on our web site that talks about controlling overflow in detail.
Thanks,
ceTe Software Support Team