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 |
You can do it using this code:
this.getField("Button1").buttonSetCaption("Finalization Documents\nJV-364 and VS-44");
Copy link to clipboard
Copied
Create an image with the text and use the image as icon of the form button.
Copy link to clipboard
Copied
You can do it using this code:
this.getField("Button1").buttonSetCaption("Finalization Documents\nJV-364 and VS-44");
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?
Copy link to clipboard
Copied
You must execute the code in the console.
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?
Copy link to clipboard
Copied
Because you don't need to run it each time the button is clicked, only once.
Copy link to clipboard
Copied
Great, thank you!
Copy link to clipboard
Copied
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.