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?
JV-364 and VS-44
Create an image with the text and use the image as icon of the form button.
You can do it using this code:
this.getField("Button1").buttonSetCaption("Finalization Documents\nJV-364 and VS-44");
Unfortunately nothing is showing on the button. Did I place the coding in the correct area and select action?
You must execute the code in the console.
Oh, thank you. I've placed it into the console and now it shows. Many thanks to you and try67.
Because you don't need to run it each time the button is clicked, only once.
Great, thank you!
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.