Skip to main content
January 8, 2019
Answered

PDF form: field change other field font

  • January 8, 2019
  • 2 replies
  • 875 views

Hello, I'm new to pdf forms so this might be silly or impossible.

I have a form where you type the key info and they feed a field where they come organized, here's exemple:

You'd fill these:

Field1: Name: Rafael
Field2: Protocol n°: 123

Field3: Status: Archived

And they feed another field like this:

Field4: "Hello, Rafael, The current status for the protocol 123 is: Archived."

What I wanted is that the info brought from the other fields came already bold (which might be another font in my case). I know you can allow rich text but as far as I've seen you have to manually set up as you type and Field4 is supposed to be a read only field.

Ps.: I've learned about /n to net new lines. But is there a way to set the new line to indent a bit more to the right? (Like the way my exemple is in this text).

Thanks in advance,

Rafael Melo.

This topic has been closed for replies.
Correct answer George_Johnson

The 4th field has to be a calculated field, and you have to set it's value using JavaScript, and specifically using several Span objects to set the different text formatting properties. More information is in the Acrobat JavaScript reference: Acrobat DC SDK Documentation

2 replies

try67
Community Expert
Community Expert
January 8, 2019

Also, you should know that a line break is "\n", not "/n". And you can indent text by inserting spaces or a tab, like this "\t".

George_JohnsonCorrect answer
Inspiring
January 8, 2019

The 4th field has to be a calculated field, and you have to set it's value using JavaScript, and specifically using several Span objects to set the different text formatting properties. More information is in the Acrobat JavaScript reference: Acrobat DC SDK Documentation

January 9, 2019

Thanks,

But tho I get the concept of it. Could you be so kind of showing me how that'd work on the exemple I've given before?

As I said, I am new to scripting and an exemple would help a lot.

Again, Thanks in advance.

Bernd Alheit
Community Expert
Community Expert
January 9, 2019

Look at the example in the Acrobat Javascript Reference.