Creating text box with javascript and changing font
I'm having a weird issue trying to select the font for a text box I'm creating with Javascript (to be used in an Action for multiple PDF's). The code I'm using is below. This creates a text box in a set location with red text. However, it keeps using Arial when I want it to be bolded (Arial Black). I tried the following properties. I'll list the results below each one.
fd.fontWeight = 700;
- This didn't work at all. I assume it's because addfield doesn't have a fontWeight property
fd.fontFamily = "Arial-Black";
- creates the text box with the proper red colour but with a non bold font Arial.
fd.fontFamily = Arial-Black;
- creates the text box but in black and with a non bold font Arial.
fd.textFont = font.Arial-Black;
- creates the text box but in black and with a non bold font Arial.
Can someone tell me how to find the proper font name to use for Arial Black? For example, I know when using fd.textFont property, you have to use font.HelvB to get Helvetica Bold. I assume there's some specific name you need to get Arial Black.
var fd = this.addField("xftPage"+p+1, "text", p, [TotWidth-450,TotHeight+789,TotWidth-144,TotHeight+729]);
fd.multiline = true;
fd.value = "STRICTLY PRIVILEGED AND CONFIDENTIAL – \nTO BE USED FOR PURPOSES OF MEDIATION ONLY";
fd.textSize=12; fd.readonly = true;
fd.fontWeight = 700;
fd.alignment="center";
fd.fontFamily = "Arial-Black";
fd.textColor = color.red;
