These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Acrobat & Coldfusion: Button icons and field locations?

EdGioja
Registered: Sep 26 2007
Posts: 25

I've looked everywhere and can not find an answer to this. I'm hoping that the vast brain trust in this "room" can help me.

Here is what I am doing...

I want to attach a .jpg of a signature to a form. Every form is different as to where that location is BUT I have a form field (fSignature) where that signature needs to go.

In Acrobat, using javascript, I am able to determine the location of that text field and place the watermark there OR use a button and replace the icon with the .jpg.

I really want to do this from ColdFusion, though. With CF8, I can do a and a to get information, but none of it tells me WHERE the fields are. Nor can I find a CF8 function that allows me to either put a .jpg in a text field (understandably) or change the icon of a form button.

So, in summary, my questions are:

Does anyone know how to change the icon of a PDF Form button?

AND/OR

Does anyone know how to determine the field.rect of a form field?

(It is my fervent hope that this is a simple issue that has been well documented and that I am just too blind to see it)

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
One can set or change a button's icon using the "FieldObject.buttonSetIcon(oIcon[, nFace])" method. The optional "nFace" parameters can be normal icon (0), down icon (1), or the rollover icon (2).

More information and an example is available in Acrobat's JS API Reference.

George Kaiser

EdGioja
Registered: Sep 26 2007
Posts: 25
I don't have access to the fieldobject outside of Acrobat though, do I?

I want to do this from ColdFusion.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Since Cold Fusion can place information into a PDF form field, just create of PDF form that contains all of the icons you need, a hidden form field that will contain the name of the icon to use, and an Acrobat Document level JavaScript that will set the button face using the icon's name.

George Kaiser