Welcome to DirectSmile

FAQ: How to avoid hyphens and/or line breaks?

link this post written on 27/06/2011
  • To top

To avoid hyphen please deaktivate it in InDesign directly. You will find this checkbox in "Window -> Type & Tables -> Paragraph".



To avoid line breaks in variable text (e.g. in headlines) please create the frame rather small in height, raise the space between the lines and select "Force output as PDF: Shrink only" after you synced the text frame.




Please note that you can not see the shrinked text in the InDesign preview, please generate a PDF to see the result.


link this post written yesterday
  • To top
Is there a way to enable the "Shrink to Fit" option via JavaScript? I need the font size to shrink but only when a certain number of characters is reached, meaning if the user has an email address that is longer than 40 characters, enable shrink to fit.. if not keep the font size at 12pt. 
link this post written 12 hours ago
  • To top

Hello Emily,

please see this forum thread as a reference: http://forum.directsmile.com/networks/forum/thread.371664 (we also answered replied to your support ticket).

Kind regards

link this post written 5 hours ago
  • To top

That should do the same in JavaScript:

function MyText2_Value(){
    MaxSize = 12; //Maximum size for shortest text; text will be 12 when there is no shrinking
    MinLen = 40; //Maximum characteramount that is allowed to fit before shrinking
    s = VAR.GetS("MyText"); //Get the text from Variable MyText
    Count = s.length;
    Factor = MinLen / Count;
    NewSize = MaxSize * Factor;
    if(NewSize > MaxSize) NewSize = MaxSize;
    return VAR.SIZE(NewSize) + s;


Best regards


  • Statistics: 4 Posts | 53 Visits
created by mixxt
  • v1.1.1
  • (highfive)