Set font of a FreeText annotation
Posted: Mon Jun 06, 2016 12:45 pm
Hello,
I want to create a FreeText annotation by JavaScript. I Need to create this annotation with a monospaced font. My script is working - but the annotation is always drawn in font.Helv(?) and not in font.Cour.
How can I change this to the needed behaviour?
Greetings
Hans-Peter
Script:
var annot = this.addAnnot
({
type: "FreeText",
page: 0,
textFont: font.Cour,
textSize: 12,
rect: [235.4114,631.2243,308.9114,644.7243],
width: 0,
fillColor: color.transparent,
strokeColor: ["RGB", 0.00,0.00,0.00],
alignment: 0,
opacity: 1,
rotate: 0,
contents: "_iMi_"
});
I want to create a FreeText annotation by JavaScript. I Need to create this annotation with a monospaced font. My script is working - but the annotation is always drawn in font.Helv(?) and not in font.Cour.
How can I change this to the needed behaviour?
Greetings
Hans-Peter
Script:
var annot = this.addAnnot
({
type: "FreeText",
page: 0,
textFont: font.Cour,
textSize: 12,
rect: [235.4114,631.2243,308.9114,644.7243],
width: 0,
fillColor: color.transparent,
strokeColor: ["RGB", 0.00,0.00,0.00],
alignment: 0,
opacity: 1,
rotate: 0,
contents: "_iMi_"
});