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

388

Likes

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

Most Valuable Participant , Jun 28, 2019 Jun 28, 2019
You can do it using this code:this.getField("Button1").buttonSetCaption("Finalization Documents\nJV-364 and VS-44");

Likes

Translate

Translate
Adobe Community Professional ,
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.

Likes

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
Most Valuable Participant ,
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");

Likes

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?

Likes

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

Copy link to clipboard

Copied

You must execute the code in the console.

Likes

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?

Likes

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
Most Valuable Participant ,
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.

Likes

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!

Likes

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.

Likes

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