XMPie Create Line breaks

Started by Slappy, August 30, 2019, 09:05:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Slappy

This may be (hopefully) simple, but I doubt it. We're doing a saddle-stitched offset job where a few thousand of the first pages get a VDP imprint in a particular area, only about .375 x 4.30" and the text has to about 10 pts. I know it's easy to scale text in XMPie based on fitting, but is there any way to introduce a Line Break instead for the really long names?
A little diddie 'bout black 'n cyan...two reflective colors doin' the best they can.

pabney

It is easy enough to add a new line, knowing where to put it is the hard part. Unless there is a character identifying where the new line is to go, I know of no way to do this well.
In cases like this, we usually just turn off hyphenation and let the name break at where Indesign determines it should. Sometimes it looks ok, others not so much.

Donaldg

Hello Slappy,

XMPie has the ability to force a line break based on counting the number of characters:

For example if a text frame needs a Title and Department, count the number of total characters and if it exceeds 36, put the department on the next line. 

if(Length(|->[Title] + @{Department}) > 36)
{
    "\r" + @{Department} + "\r"
}
else
{
    @{Department}
}

Help link: https://help.xmpie.com/

Slappy

Ah, cool! I've done very little with scripting in XMPie so far but I'll try this out if the job in question becomes problematic.

I did a quick Longest Field check and think I'll get off easy this time, but I like options! Thanks~
A little diddie 'bout black 'n cyan...two reflective colors doin' the best they can.