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

Multiline Button Label

Community Beginner ,
Jun 27, 2019 Jun 27, 2019

Copy link to clipboard

Copied

I'm in Acrobat Pro I have a 50 plus page document. What I want to do is create buttons that will print certain forms within the document. My question is not with creating the button, but with the label of the button - can you have a multiline button label. I'd like the label to be, Finalization Documents JV-364 and VS-44, just like the image below. Would this be possible?

          

Finalization Documents

JV-364 and VS-44

TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.6K

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Jun 28, 2019 Jun 28, 2019

You can do it using this code:

this.getField("Button1").buttonSetCaption("Finalization Documents\nJV-364 and VS-44");

Votes

Translate

Translate
Community Expert ,
Jun 27, 2019 Jun 27, 2019

Copy link to clipboard

Copied

Create an image with the text and use the image as icon of the form button.

Votes

Translate

Translate

Report

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 ,
Jun 28, 2019 Jun 28, 2019

Copy link to clipboard

Copied

You can do it using this code:

this.getField("Button1").buttonSetCaption("Finalization Documents\nJV-364 and VS-44");

Votes

Translate

Translate

Report

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 Beginner ,
Jun 28, 2019 Jun 28, 2019

Copy link to clipboard

Copied

Thank you for the coding try67. I copied and pasted it under the Actions tab of the button Properties, Under the Select Trigger I have Mouse Up and the Select Action is Run a JavaScript.

Unfortunately nothing is showing on the button. Did I place the coding in the correct area and select action?

Votes

Translate

Translate

Report

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 ,
Jun 28, 2019 Jun 28, 2019

Copy link to clipboard

Copied

You must execute the code in the console.

Votes

Translate

Translate

Report

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 Beginner ,
Jun 28, 2019 Jun 28, 2019

Copy link to clipboard

Copied

Oh, thank you.  I've placed it into the console and now it shows.  Many thanks to you and try67.

Just so I understand, why is this coding placed into the console instead of just the Run JavaScript where I placed it?

Votes

Translate

Translate

Report

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 ,
Jun 28, 2019 Jun 28, 2019

Copy link to clipboard

Copied

Because you don't need to run it each time the button is clicked, only once.

Votes

Translate

Translate

Report

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 Beginner ,
Jun 28, 2019 Jun 28, 2019

Copy link to clipboard

Copied

Great, thank you!

Votes

Translate

Translate

Report

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 ,
Nov 24, 2019 Nov 24, 2019

Copy link to clipboard

Copied

LATEST

Here's another way you can do it, and have absolute control of mixing fonts, colors, pictures, etc:

You are probably adding the button onto the forms overlay that has a printed page behind it.

1. Revise that printed page in Word, etc., by placing onto it a box containing the legend exactly as you want it to look. 

2. Make a separate PDF of only that page.

3. While editing the original PDF, use the Replace Pages function to substitute the new printed page from that separate PDF for the old printed page.

4. Add a button to your form. Set its appearance properties to have its Fill Color as "no color" and the options properties to have the label text blank. You probably want to have your Border Color as "no color" too so you have some size flexibility in the next step.

5. Position and stretch that new, transparent, button over the multi-line legend you created on the new printed page.

6. Set your Actions to whatever you want your button to do.

Votes

Translate

Translate

Report

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