Hi all,
I need to turn baseline alignment off for every text frame. I used alignToBaseline = false until I learnt that this property isn't available in teh IDS CS4 DOM. I was adviced to use gridAlignment instead but it's CS5+ only.
So my question is how do we set baseline alignment off for textframes in InDesign Server CS4 ?
Thanks in advance,
Loic
@Loic – My first reaction after reading that was: "I can't believe that…"
"alignToBaseline" is not available for "story" objects in InDesign Server CS4?
But, unfortunately, you could be damn right. Just checked for it in Jongwares' chm DOM representation of InDesign CS5 Server. It's missing there as well.
That's a real drag!
Sorry, but I cannot help any further…
Uwe
That's actually not a bad thought!
Text.gridAlignment = GridAlignment.ALIGN_BASELINE does the same thing as:
Text.alignToBaseline = true;
(gridAlignFirstLineOnly is a bit different)
Unfortunately, that property was introduced in the Roman version in CS5.
At least we have a solution for CS5 and later...
We've been using that gridAlignment for years on CS4 Server. To make your code run everywhere, use the properties property like below - it ignores unsupported properties.
function setAlignToBaseline(aText,aValue)
{
if( aValue ) {
aText.properties = {
alignToBaseline: true,
gridAlignment: GridAlignment.ALIGN_BASELINE
}
} else {
aText.properties = {
alignToBaseline: false,
gridAlignment: GridAlignment.NONE
}
}
}
North America
Europe, Middle East and Africa
Asia Pacific