These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Call Javascript Gurus. Button for Submit and Print

photoaz
Registered: Aug 10 2007
Posts: 45

For the forms we send out we need to have our clients to not only submit the info back to us but have a hard copy for their records. Currently I have two buttons on the form, one for submit and one for print, have a text box next to the buttons to push both and in the separate instruction letter tell them to make a hard copy and submit but we still get calls everyday where they have only pushed one button and have to fill it all out again.

So I am looking for just one button I can put on the page for Submit and Printing. I am using LiveCycle for creation so they are being used for a dataset and the Submit button does not allow for adding Print.

So please put your minds to this.

Thanks

Bill Guy

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You create a standard button and the script for the sumbit and the print to that button. Do not use the predifined buttons.

George Kaiser

photoaz
Registered: Aug 10 2007
Posts: 45
Well the correct Javascript is what I am asking for. How do you write this or is there somewhere where I can cut and paste it in.

Bill Guy

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
There have been any number of post and tips that have included the link to [url=http://www.adobe.com/devnet/acrobat/javascript.php]JavaScript for Acrobat[/url].

For Acrobat JS, LiveCycle Designer may need some minor changes as included in the LCD documentation:

To print:

this.print(false, this.pageNum, this.pageNum);
// print a file silently
this.print({bUI: false, bSilent: true, bShrinkToFit: true});

To submit:

this.submitForm("http://myserver/cgi-bin/myscript.cgi#FDF");

There are many other variations and possibly some restrictions depending upon waht version and product the user has.

LiveCycle Designer:

Print:

JavaScript
xfa.host.print(1, "0", "0", 0, 1, 0, 0, 0);
FormCalc
xfa.host.print(1, "0", "0", 0, 1, 0, 0, 0)

For submitting in LCD please see the Scripting documentation. There are a number of options and issues you should be aware of before using this item.

George Kaiser