Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Combining PDF forms causes Text Field Font to Change

New Here ,
Jan 11, 2018 Jan 11, 2018

[I am using Acrobat DC Pro on Windows 10]

I have a master form that users (employees) fill-in containing, among other things: name, address, gender, marital status, contract number, user/employee's name, etc.  I also have other documents, like internal product order forms, internal service order forms, and contract; these all need a lot of the same information that is collected on the master form.  The master form populates these other forms when merged/combined.

My 1st problem is that these different forms all have different font size constraints for the same data (ie date of birth) -which is beyond my control as they must match our preprinted (blank) forms (to keep the auditors happy).  The master form's 'date-of-birth' text field is set to font size 12.  On the contract form, we don't have enough space to have it print/show at this size, so the size is set to 'Auto'.  For some reason when the two PDF forms are merged using the 'Combine Files' tool, the 'date-of-birth' text field does not (no longer) auto reduces the text (in this case a date) down to fit within the allotted space (text field box).  Going in to the 'Prepare Form' tool, double clicking the 'date-of-birth' text field, and manually changing the font size does nothing -no change is visible.  The text remains the same; even changing the font has NO effect.

My 2nd problem is that sometimes (on different text fields) the font AND size change after using the 'Combine Files' tool.  This usually happens to:

a text field that, on the master form is hidden and populated by combining other visible text fields via javascript (example:  text field 'FullName' is hidden on master form and is populated by javascript firing via the 'On Blur' Action of text fields 'FirstName' and 'LastName').  On the other documents/forms that use the 'FullName' text field (set to Visible on these documents/forms), sometimes the font AND size is different/changed from the field's preset settings.  Changes do not take effect and will not react when I go in to the 'Prepare Form' tool, double click the text field, and manually try to change the font size.

-Tyler.

TOPICS
PDF forms
3.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Jan 15, 2018 Jan 15, 2018

First, combining forms is a very poor way to copy data. It is not reliable. It works one way today, but Adobe has no obligation to keep it working the way it does today. In fact, it's likely to change for their convenience at any time.

There is little you can do to keep the fonts and other properties the same. You could write scripts to fix up the fields after the merge, but this is more difficult than writing a script to simply copy the values between forms. Which is the way it should be done.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 15, 2018 Jan 15, 2018

First, combining forms is a very poor way to copy data. It is not reliable. It works one way today, but Adobe has no obligation to keep it working the way it does today. In fact, it's likely to change for their convenience at any time.

There is little you can do to keep the fonts and other properties the same. You could write scripts to fix up the fields after the merge, but this is more difficult than writing a script to simply copy the values between forms. Which is the way it should be done.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2018 Jan 16, 2018

Thank you Thom;

I was beginning to suspect the most reliable way of copying data between forms was by script.  Now that you've confirmed it, I think I've got a fair bit of work to do! 

-Tyler.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2018 Jan 16, 2018

One other question;

Is there an event that fires when documents (with or without) forms are combined; where I would put the script(s) to copy data to various fields?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2018 Jan 16, 2018
LATEST

I suspect that the calculation events, as well as the other value related events are fired when documents are merged. The only way to know is to test it, but I would not rely on this because Adobe does not have any obligation to keep things the way they are. The best thing to do is not combing them.

It's actually quite simple to copy data between fields on different documents with the same name.  Write a script that loops though all fields on the destination form. Test each field name on the source form to see if it exists. If it does then transfer the data. Fields that use export values such as radio button must use the same export values.  And make sure that fields you don't want copied have unique names.

The script must, of course, be able to access fields on both forms. So it must be either a trusted script or both documents must be "disclosed".

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines