Recent

Author Topic: XMPie Create Line breaks  (Read 511 times)

0 Members and 1 Guest are viewing this topic.

Offline Slappy

  • Ninja Member
  • *
  • Posts: 4118
  • Gender: Male
  • Come On. Fhqwhgads.
XMPie Create Line breaks
« on: August 30, 2019, 11:05:48 AM »
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.

Offline pabney

  • Jr. Member
  • **
  • Posts: 65
Re: XMPie Create Line breaks
« Reply #1 on: August 30, 2019, 12:13:13 PM »
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.

Offline Donaldg

  • New Member
  • *
  • Posts: 1
    • XMPie
Re: XMPie Create Line breaks
« Reply #2 on: September 06, 2019, 10:06:45 PM »
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/

Offline Slappy

  • Ninja Member
  • *
  • Posts: 4118
  • Gender: Male
  • Come On. Fhqwhgads.
Re: XMPie Create Line breaks
« Reply #3 on: September 07, 2019, 11:26:12 AM »
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.