12
Explorer
,
/t5/acrobat-discussions/changing-font-by-javascript/td-p/14243743
Nov 18, 2023
Nov 18, 2023
Copy link to clipboard
Copied
Please!! .... I need help. I 'm so stuck . I've tried but I can't get a font to change within my fields by javascript. It always change to Calibri not Calibri Bold. I have used the code "console.println(this.getField("Field1").textFont);" to konw the internal name of the Calibri Bold font. But it shows only Calibri for the "Field1" that has been set to "Calibri Bold" manualy.
for (var i=0; i<this.numFields; i++) {
var f = this.getField(this.getNthFieldName(i));
if (f.type == "text") {
f.textFont = "Calibri Bold";
f.textSize = 12;
}
}
TOPICS
JavaScript
,
PDF forms
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 ACCEPTED SOLUTION
Community Expert
,
/t5/acrobat-discussions/changing-font-by-javascript/m-p/14243820#M439449
Nov 18, 2023
Nov 18, 2023
Copy link to clipboard
Copied
Use this: "Calibri,Bold"
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/acrobat-discussions/changing-font-by-javascript/m-p/14243820#M439449
Nov 18, 2023
Nov 18, 2023
Copy link to clipboard
Copied
Use this: "Calibri,Bold"
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
elendil84
AUTHOR
Explorer
,
LATEST
/t5/acrobat-discussions/changing-font-by-javascript/m-p/14243836#M439450
Nov 18, 2023
Nov 18, 2023
Copy link to clipboard
Copied
You are really amazing...............
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

