/ Id-Extras Forum / How to control font size of checkbox before exporting to PDF
-
Author
-
Teagan Caudle
Hello,
When I first started with InDesign and FormMaker, my checkbox would be a rounded corner square that I would activate as a checkbox from Buttons and Forms. But, the highlight of the active checkbox in the PDF would spill past the lines of the square. So, I have started designing my InDesign checkbox consisting of a rounded corner square with the active checkbox nested inside. Now, when you check off the box in the PDF, the checkmark starts at the standard size, then when you click off, it reduces it by a point. So, I go into Acrobat, select the checkboxes, go into Properties, click on the Appearance tab and change the Font Size from Auto to 8 pt. Is there a way in InDesign to set the font of the checkbox before exporting it to PDF so I don’t have to keep adjusting the checkbox font when I make changes to the form? Thank you for your help!
– Teagan
ArielKeymasterHi Teagan,
I’m not sure I’ve understood what you’re seeing in Acrobat exactly.
Could you post some screenshots, or a sample PDF file?
Thanks!
KeltexanParticipantHello Ariel,
I have provided a screenshot of the checkbox when clicking on it, the checkbox when clicking away, and the Appearance tab in the properties of the checkbox. I would have to select all the checkboxes in the document in Prepare Form, open the Properties, and under the Appearance tab, change the font size from Auto to 6 pt to stay at the initial size.
ArielKeymasterA checkbox in InDesign is a multi-state object, I think. Have you set an image for each of the (is it 6?) states (on, off, rollover, etc.)?
KeltexanParticipantHello Ariel,
I have yet to set an image for all the states, but I will try that! Thank you!
KeltexanParticipantHello Ariel,
I have tested setting an image for all the states but still get the same results in Acrobat. But, I have noticed that when I turn off the fields highlighting, the correctly sized checkmark shows. I did more research and came across a discussion about the InDesign checkmark being overridden by Acrobat settings. So, I would either have to write a script to turn off highlighting on the local, then turn it back on with a Will Close (already doing something similar in changing the highlight color to reflect company colors), go through Acrobat each time I export to change the font size of the checkmark or leave it as it is. Thank you for your help!
– Teagan
ArielKeymasterHi Teagan,
Again, I think you’re more of an expert than I am about the details of form creation (I just make the tool, not the forms!), but I think the following line of script, added as a document script in InDesign, should work. The idea here is the same as I posted in your previous question — to add a document script and then delete it before distributing the PDF:
this.getField("Check Box 1").textSize = 6;
Obviously, you would change the field name in quotes to whatever you’ve called your field, and change the point size to whatever you want (you mentioned 6).
Does that work?
KeltexanParticipantThank you, Ariel! Since this is a document-level script, would I be able to make it cover all checkboxes by prefixing them with “ckb.” and using that as the checkbox name? That way, I don’t have to code all of the checkboxes in a document.
– Teagan
KeltexanParticipantHello Ariel,
It worked. I experimented with a smaller form with fewer checkboxes. I already prefix fields by type in the name (i.e., ckbCheckbox, txtTextfield, rdoRadio, ddlComboBox, etc.) for ease of identification in scripts. All I did was add a period between the prefix and the name (ckb.Checkbox), then wrote the script as
this.getField(“ckb”).textSize=6;
ArielKeymasterGreat, sounds good!
Just make sure doing that since you’re using hierarchical field naming, there are no unintended consequences.
-
AuthorPosts
Tagged: FormMaker