Copy link to clipboard
Copied
I know there must be an easy solution to this and I am sure I am not the only one to ask.
When I export an interactive PDF from InDesign, the text fields inherit Times New Roman as the default field font.
It doesn't matter what paragraph style is default in InDesign.
Is there a way to change the default font in Adobe Acrobat Pro XI globally so that it defaults to whatever I choose?
Thanks in advance.
Alan
Copy link to clipboard
Copied
Again that is not even a vaguely useful answer and it says by your profile that you are an expert.
My question relates to the default font in Adobe Acrobat for form fields. I don't want to 'click' on anything.
I have found a solution elsewhere posted by someone that is not an expert - just someone that needed an answer and put in the time to find one.
It is beautiful and it is a javascript that is run as an action.
To do this in Adobe Acrobat XI, open Tools and then Action Wizard. Click on 'Create New Action' - Select 'More Tools' and choose ' Execute JavaScript.' Click the arrow icon in the centre 'Add to right hand pane.' There should now be a new untitled action. Double click on 'Specify Settings and paste in the script below.
for (var i = 0; i < numFields; i++) {
var fName = getNthFieldName(i);
var f = getField(fName);
if (f.type === "text") {
// f.alignment ="center";
f.textSize = 6;
f.textFont = "Helvetica";
// Other properties go here
}
}
The only part that didn't work was the 'center' Font type and size does which is really a great leap forward for my purposes.
Just tweak it to your liking. I found that when you specify the font, there must be no space so for example Open Sans would be OpenSans
I hope this helps someone in the near future.
Copy link to clipboard
Copied
Since the fields are created in InDesign you should ask your question over at the ID forums. Acrobat is not involved in this process.
If you created your fields in Acrobat (which is a better idea anyway, IMO) then yes, you would have been able to set the default font used for them.
Copy link to clipboard
Copied
My question is solely related to Acrobat Pro XI. I want to change it's default font globally.
Copy link to clipboard
Copied
You can change the font for new fields that you are creating. You can't change it automatically for all fields in all pre-existing documents that you open...
To do the former change one field and then right-click it in Form Edit mode and select Use Current Properties As New Defaults.
Copy link to clipboard
Copied
Again that is not even a vaguely useful answer and it says by your profile that you are an expert.
My question relates to the default font in Adobe Acrobat for form fields. I don't want to 'click' on anything.
I have found a solution elsewhere posted by someone that is not an expert - just someone that needed an answer and put in the time to find one.
It is beautiful and it is a javascript that is run as an action.
To do this in Adobe Acrobat XI, open Tools and then Action Wizard. Click on 'Create New Action' - Select 'More Tools' and choose ' Execute JavaScript.' Click the arrow icon in the centre 'Add to right hand pane.' There should now be a new untitled action. Double click on 'Specify Settings and paste in the script below.
for (var i = 0; i < numFields; i++) {
var fName = getNthFieldName(i);
var f = getField(fName);
if (f.type === "text") {
// f.alignment ="center";
f.textSize = 6;
f.textFont = "Helvetica";
// Other properties go here
}
}
The only part that didn't work was the 'center' Font type and size does which is really a great leap forward for my purposes.
Just tweak it to your liking. I found that when you specify the font, there must be no space so for example Open Sans would be OpenSans
I hope this helps someone in the near future.
Copy link to clipboard
Copied
Well, if you don't want "vague" answers don't ask vague questions. The code you found works, but it only affects the file(s) you run it on.
It's by no means a "global" setting, but I'm done trying to help you. Good luck!
Copy link to clipboard
Copied
It's not a vague question - it is extremely specific. The problem is with you - you didn't know the answer and your replies are complete rubbish.
The answer I found is a great time saving solution and in point of fact, is better than changing the font globally because I may want to specify different fonts for different forms.
You weren't helping at all so I am very pleased that you are 'done helping.'
Copy link to clipboard
Copied
Believe me, I'm very familiar with the code above and have written similar ones, only 100 times more complicated. That's not the issue.
Anyway, this is a pointless discussion.
Copy link to clipboard
Copied
Guys play nice
Copy link to clipboard
Copied
I am playing nicely - it's these experts - they can't seem to understand a simple question.
PS - If your profile picture is really you - you're in the wrong place. You should be in heaven!
Copy link to clipboard
Copied
zippidi wrote
I am playing nicely - it's these experts - they can't seem to understand a simple question.
...
May be I don't understand what you mean with "default font".
Copy link to clipboard
Copied
lol Thanks for the compliment . ACP/MVPs are encouraged to use real photos to create a friendly atmosphere for posters. You might not realise but unless 'staff' is under somebodies photo/avatar, then you are just talking to an end user like yourself and so it is important to not get too aggressive as people are doing their best to be helpful.
I don't know if the answers you received are good or bad as I was just moderating the thread, but try67 has over 40,000 points here -that's equivalent to having answered 4000 correct questions and Bernd 17000 points or 1700 questions. You don't get that kind of total unless you actually know your subjects.
I'll pass your compliment onto my husband next time he threatens to trade me in for a younger model
Copy link to clipboard
Copied
zippidi, your obnoxious and a troll, you asked specifically about default fonts and converting from InDesign. You did not ask about changing the existing font on fields, which has no effect on the defaults. Had you done so, Try67 would have given you the code. Which by the way, the code you posted was definitely written by an expert. But instead you were rude and disrespectful to the person that was trying to help you. Why don't you not come back to this forum.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Hi Thom,
Would you or someone you know be able to spare that script to deal wiht my already defiened fields please? I have 740 of them in my (34-pages) from!
It would be too bad if I had to go through them one by one.
Thank you so much in advance!
Cheers,
Maddy.
Copy link to clipboard
Copied
What font do you want to use?
Copy link to clipboard
Copied
You can use the script at reply #4
Copy link to clipboard
Copied
Thank you guys for your replies!
I did tried wih the script with the font I wanted to use (Cordia New), also deleted the // in front of f.alignment so the 'centre' come in effect too, but none of these worked with my previously (existing) fields.
As someone pointed out in the post chain that it would only work for newly defined fields defined after this script put in.
I was hoping for a script that applies the font settings to all my existing fields and not so much of for future ones....
please....
Copy link to clipboard
Copied
What happens when you use the script?
Copy link to clipboard
Copied
It sets the font default for future created fields, and not changing the font settings to the existing fields as I was hoping for it to do...
Also, Thanks for pointing out the 'centre'/'center'. I've made sure it's center.
Cordia New is what I need - whats the specific value for it, please? - though, it set the default for future-created fields correctly already with using 'CordiaNew' (without space).
So, still not working for my existing 740 fields...:(
Copy link to clipboard
Copied
Create a field with this font and read the textFont entry with Javascript.
Copy link to clipboard
Copied
madelannes11484240 wrote
It sets the font default for future created fields, and not changing the font settings to the existing fields as I was hoping for it to do...
For the third time in this thread, no, it doesn't do that. It ONLY edits the fields that already exist in your file.
Copy link to clipboard
Copied
Haha... .... for the 3rd time that I tested it and kept getting the same results... Someone in the initial chat had pointed out this script does not do what I'm looking for, hence I'm asking if anyone has the 'correct' script...
Thank you for your cuteness!!!! wonderful day.
Copy link to clipboard
Copied
So for the third time I'll say that you can't change the default settings using a script. This will be my last reply on this matter.
Copy link to clipboard
Copied
The posted script will change the font settings in the existing fields! Nothing more.
Copy link to clipboard
Copied
Actually, it's the other way around. The code edits existing fields, not the default settings for new ones.
And it's "center", not "centre".
Also, the font name has to have a specific value, not just what you see in the drop-down list. It needs to be the internal name.


-
- 1
- 2