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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Field Font Size Formula

Status
Not open for further replies.

rhoneyfi

MIS
Apr 8, 2002
200
US
Hello,
I am using Acrobat 5.0. I have created a pdf contract document that has form fields in it. Basically, a user goes online, fills out some fields and this info gets sent to the PDF doc when they click the submit button. It works great, except:
1) One of the form fields is for the user name. If they have a long name, it gets cut off on the PDF doc. For legal purposes, the length of the form field is limited. It is possible to have some kind of java code associated with the form field so that if the client name is greater than a certain number of characters, it makes the font size for the form field 8 points????
I know I can select the option of 'milti line' in the form field properties, but this will not work for me in my case.
Thanks
 
Not every character is the same width, but you could I guess
do something like this.

--I dont know where to put the code... But here is the code anyways

if(this.getField("WhateverName").value.length > SomeAmount) {
this.getField("WhateverName").textSize = 8;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top