Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing Text Color in Adobe Acrobat 9 Dimension

Status
Not open for further replies.

genzu

Technical User
Jun 7, 2011
1
0
0
US
So, I found a very useful tool surfing around that allows you to "force-edit" the dimensions in Acrobat 9 (yes, it's idiotic that this isn't an option in the program itself).

I made this .js file in textedit (saved as .js) and put it in the JavaScripts file under Adobe. (Now, when I select a comment dimension on a document, under the edit menu is a new box which allows you to force the dimension):


app.addMenuItem({
cName: "editSelMeas", cUser: "Edit selected measurements",
cParent: "Edit",
cEnable: "event.rc = (event.target.selectedAnnots != null);",
cExec: "editSelMeasurements();"
});

function editSelMeasurements() {
var sAnnots = this.selectedAnnots;
var dlgQ = "Enter dimension, including units";
var dlgT = "Edit measurement label";
var dlgDA,reply,nProps,aRect;
for (var i=0; i<sAnnots.length; i++) {
dlgDA = sAnnots.contents;
this.scroll(sAnnots.rect[0],sAnnots.rect[3]);
sAnnots.setProps({ style: "D", dash: [3,2] });
reply = app.response(dlgQ,dlgT,dlgDA);
nProps = { style: "S", contents: reply };
sAnnots.setProps(nProps);
}
}


This works fantastic, but I can't figure out how to change to color from Black to Red. Is there some way to edit this file to make the default font color on the dimension string red? (Or another similar drop down box option which lets you change the color?) Any help is greatly appreciated. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top