Tuesday, December 20, 2005

 

Q&D Leading Fixer

I was about to deliver a proof PDF to my client when I noticed that one of the heads in one of the frames (on page 531) was not aligned correctly. A quick look confirmed that the leading of the text frame had switched from Leading to Ascent. Further examination of the document revealed other instances of this problem.

A quick & dirty script to the rescue:
//DESCRIPTION: Format head leading fixer

myDoc = app.activeDocument;
app.findPreferences = null;
app.changePreferences = null;
myFinds = myDoc.search("",false,false,undefined,{appliedParagraphStyle:myDoc.paragraphStyles.item("format")});
for (var j=myFinds.length - 1; j >= 0; j--) {
  myFinds[j].parentTextFrames[0].textFramePreferences.firstBaselineOffset = FirstBaseline.leadingOffset;
}
An now all is well. Time to export another proof PDF.

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?