Expand my Community achievements bar.

Printing and email script/button

Avatar

Former Community Member
I have a form that will be deployed out to employee's laptops that they will use to generate a quote to customers. I need a button that will print the said form as a static pdf document (none of the controls are active that can change the price) and then email the static pdf document form to the customer.



I was able to generate the button to generate the email with the form as an attachment but the form is still dynamic using the following script:



var To = mail.rawValue;

var Subj = "Direct Drive AC Start System Upgrade";

var Bod = "Please find attached the requested package system upgrade data sheet with pricing.";

var bc = "T3_CS_New_Inquiries@solarturbines.com";

var cc = "CSSR@Solarturbines.com";

Subj = Subj +"( "+InquiryNo.rawValue+" )";



event.target.submitForm({cURL:"mailto:"+To+"?subject="+Subj+"&Cc="+cc+"&bcc="+bc+"&&body="+Bod,cSubmitAs:"PDF",cCharset:"utf-8"});



I also tried setting all the fields as readonly before generating the email but with no success:



for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) {

var oFields = xfa.layout.pageContent(nPageCount, "field");

var nNodesLength = oFields.length;

// Set the field property.

for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {

oFields.item(nNodeCount).access = "readOnly";

}

}



Any help will be greatly appreciated.
1 Reply

Avatar

Former Community Member
Hi ,

I have made a template in Designer and m generating the Pdf's using the Output ES tool. I want to control the saving and printing options of the Pdf generated. Kindly help ...