Copy link to clipboard
Copied
I am using the new feature of InDesign CS6 that allows creation of form fields for PDFs. After exporting the page to PDF via the interactive setup dialog [command+E 'Adobe PDF (interactive)] I'll inspect the finished PDF in Acrobat 9. Everything looks as it should, except that when I type in some sample text in a text field, it uses Times Roman as the font. I would like it to use Arial regular.
I can't find any way to specify a font for these form fields in InDesign CS6. This particular project involves quite a large number of files - so I'd rather avoid a process that requires me to go in to Acrobat and 'tweak' each PDF, changing the font in the properties dialog of each field to the Arial.
Is there a way to set the font of a form field directly in InDesign? I've looked around and can't find a menu or dialog that addresses this.
Thanks in advance for any help.
This is major step forward for form creation but it isn't perfect. Some things need to be finished in Acrobat.
Bob
Copy link to clipboard
Copied
In Acrobat, select "Content" (from your screen capture, 2nd tool down) At the bottom of that tool, there will be "Select Object". Use this tool to Control Click on field > Properties > Appearance
Copy link to clipboard
Copied
Thanks! This is the best answer/solution I could find. The steps were a bit different on the version I have but could still make the fonts work.
Copy link to clipboard
Copied
Thank you so much for this!!! I had to create a sheet of labels and without knowing the Properties option you mentioned, I thought there's no way to specify a font. (I had made a version without interactive text fields where I would have to individually edit every line to keep formatting.) Using your instructions, I set the properties for one label, then I dragged the text fields I set up over to each label, so now when I update one text field it updates all. So helpful.
Copy link to clipboard
Copied
I've been searching for a solution and found a fellow who writes custom scripts for Acrobat.
He created a script with a front end that lets you select fields to edit (by name, by type, by page) and allows you to mass edit field properties. Based on the number of forum posts here and elsewhere about this problem, this could be a very valuable tool.
Custom-made Adobe Scripts: Acrobat -- Mass Edit Fields Properties
This text editor keeps changing the URL into a clickable link page title, but in case that doesn't work, here it is without the auto-link feature that keeps overriding my paste.
try67.blogspot.com/2013/06/acrobat-mass-edit-fields-properties.html
Carol
Copy link to clipboard
Copied
I hope this helps anyone working with Adobe CC.
> Create your text field in InDesign
> Export as an Interactive PDF
> When in Acrobat, click "Prepare Form"
> Right click on your text field
> Click Properties...
> Adjust font, alignment, color, size etc. here.
Copy link to clipboard
Copied
As this thread has been resurrected :-), I'll take a ride and mention:
http://www.id-extras.com/products/formmagic
... which is by far the easiest way to prepare forms fields in InDesign and assign a font to them that will carry through to Acrobat. The free edition lets you create short forms with all formatting intact.
Copy link to clipboard
Copied
In Acrobat Pro DC (2015 release)
Choose "tools"
Choose "prepare form"
Now select the editable fields you want to change the font in (from the Times default)
On the right, choose "more" (there is a tool icon next to it)
Choose "Show field properties"
Choose "Appearance"
Under "Text" set your font and font size
I hope that helps, it took me ages to find.
Copy link to clipboard
Copied
Yes, but this is PITA as you have to to di EVERY TIME. Should be a way to do that in INDD or a way to change the defaults in Acrobat.
Copy link to clipboard
Copied
We agree, there should. Sadly, there isn't.
There is a way to make this easier, and that is to make an Action in Adobe Acrobat DC that will run a javascript over the PDF to find each form field and change the formatting to what is desired. Here is what the action should look like:
Copy link to clipboard
Copied
Colin, your action isn't showing. Did you try to attach something to an email?
Copy link to clipboard
Copied
Thank you Peter. I was typing it in and hit the wrong button : ANYWAY, here is what it should look like!
Here is the javascript code so you don't have to retype it
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
}
}
There is also a good resource for javascripting with Adobe Acrobat if you want to take the edits even further: http://help.adobe.com/livedocs/acrobat_sdk/10/Acrobat10_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?h...
Copy link to clipboard
Copied
Thank you for this! I've previously had to go to prepare form and select all text and combobox fields by hand through 100's of field by carefully shift clicking and control clicking, which sometimes I messed up.
Now I have actions that can do this in a few seconds! It took a little bit of referencing the DC SDK to get Myriad Pro to work. I had to type it out "MyriadPro-Regular" and referenced my font folder for that.
I've seen this code before and tried it but the poster always said to run it in the console. When I would try that, it would always bounce back as undefined. These actions work great though. Thank you again Colin! You've saved hours of my life!
I also modified the script to look for a text field OR combobox field. The only caveat is there is no option for center-aligned comboboxes, so that line would need to be omitted.
Copy link to clipboard
Copied
You are an absolute beauty - thanks so much for posting this solution. It works perfect. I have posted messages in the experts forums and they know nothing - all saying it can't be done and try this script or that script and by the way it costs that amount.
I guess they didn't want to post a solution because obviously no one would buy these costly solutions.
Are you able to post the script with other properties that one might use such as font colour or underline, bold, italicise etc.
I'd really appreciate it.
Thanks again - you're solution is a God send.
Copy link to clipboard
Copied
Hi,
Colin pointed to a great resource of information using JavaScript with Acrobat Pro 10.
For details and code sample snippets see also this overview of Field properties:
For formatting text see e.g. richValue :
Regards,
Uwe
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I don't know how to fix the code but you can change alignment in Acrobat if you do Select Object > Right Click > Properties > Options > Alignment > Center.
Copy link to clipboard
Copied
Oh, no, really? You have to reformat all the text fields every time you save the PDF?
I'm going to cry.
Copy link to clipboard
Copied
If all of the fields are in the same place or close you can just use the replace pages command in Acrobat to replace only the art and leave the form fields intact.
Copy link to clipboard
Copied
Wow THANKS Bernicer!! That worked like a charm.
Copy link to clipboard
Copied
Hi Bobby,
It is possible to change fonts in Acrobat Pro. You can fix multiple fields at a time (I've done as many as 20 at a time) by doing a marquee select around them (make sure Text Field Properties dialog box is open to the Appearance tab before selecting the fields) and changing ONLY the font property.
Copy link to clipboard
Copied
Yes you can.
First click on Form Tools, then click Form Edit, then just right click on a form field, select Properties, second Tab - Appearances.
Here you can designate the font and its size.
I hope that that helps, even though it may be kind of late now in 2018, but if anyone wants to know that is how I do it.
Also note, I use InDesign CS6 to create my PDFs.
Copy link to clipboard
Copied
Use system fonts.
Copy link to clipboard
Copied
I know this is an old post and that InDesign now allows you to enter the font for form fields, but there are still use cases in forms created in InDesign that this may be useful for such as forgetting to set it, modifying an older form, or deciding to change the font. This method could change hundreds of fields with a simple script and save you immeasurable time in InDesign by having to manually set each field.
This is the AcroForm solution in Acrobat:
First, you need to find out the PDSysFont Name.
Create a text field in a PDF document and change the font of the field to your desired font in the field properties
Open the JS Console (CTRL + J) and execute the script (Select All and hit CTRL + Enter)
this.getField("Text1").textFont
Replace "Text1" with your field name
The string returned to the console is the PDSysFont that you'll need below.
After you get the font name, you can then run this script in the console (Remember to select all and CTRL + Enter to run the script). This script assumes you want the font to be Myriad Pro Regular, and it will apply to all text fields in the document. Change MyraidPro-Regular to the PDSysFont you got in the steps above. PDF forms also have other form field types such as combobox. Lookup the Acrobat SDK for more info:
for (var i = 0; i < this.numFields; i++) {
var fname = this.getNthFieldName(i);
var f = this.getField(fname);
if(f.type === "text") {
f.textFont = "MyriadPro-Regular";
}
}