cancel
Showing results for 
Search instead for 
Did you mean: 

Interactive Forms, send e-mail and attach the PDF document

Former Member
0 Kudos

Hi all,

I've the form and I don't know if I can send an email, trough a button (Jscript or Formcalc), with in attachment my filled form in PDF format (further the XML Data)?

I don't now also if with Jscript, i can invoke the print and set automatically the print device that I want use to print.

Thanks in advance,

Antonello Didonna

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Arjun,

you can use the following javaScript:

var lEmail="email address";
var myDoc = event.target;
try {
  myDoc.mailDoc({
    bUI: false,
    cTo: lEmail,
    cCC: "",
    cSubject: "Subject",
    cMsg: "..."
    });
} catch (e) {}

Regards

Michal

Former Member
0 Kudos

Hi Antonello,

for email: That code attach the filled form at the email.

For printing: You found that code in "JavaScript for Acrobat API Reference". Good job. So in LC Designer, you have to do a small change.

var myDoc = event.target;
var pp = myDoc.getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic;
pp.printerName = "hp officejet d series";
myDoc.print(pp);

For FilePrintSilent: It looks as DDE message. It isn't my cup of tea.

Michal

Former Member
0 Kudos

Hi Antonello,

you can use the following javaScript for sending an email:

  var myDoc = event.target;
  try {
    myDoc.mailDoc({
      bUI: false,
      cTo: "email",
      cCC: "",
      cSubject: "Subject",
      cMsg: "..."
      });
  } catch (e) {}

For printing, you can use javaScript:

xfa.host.print(1, '0', (xfa.layout.pageCount()-1).toString(), 0, 1, 0, 0, 0);

More info about the [method print|http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/wwhelp/wwhimpl/js/html/wwhelp.htm?href=001735.html#1587049]

Michal

Former Member
0 Kudos

Hi Michal,

Ok for the email...

now I'm looking for something to attach a file at the mail.

For printing, I've found this older code to set the printer:


var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic;
pp.printerName = "hp officejet d series";
this.print(pp);

This code seems that is supported on Abode 6 or later.

You know another method to set the printer?

The target is print the PDF at file.

I've seen also that there's also this method but I don't understand how I can use it!


FilePrintSilent
Prints all pages in a document, without displaying a print dialog box to the user. For PostScript printing, only Level 1 operators are used, only ASCII data is generated, and the documentu2019s pages are not shrunk to fit into the imageable area of the printed page.
FilePrintSilent is also supported in Adobe Reader.
Syntax

[FilePrintSilent(char* fullPath)]

Parameters
 

fullPath

	
The full path of the file to be printed.

FilePrintSilent [here|http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?&accessible=true].

Thanks so much,

Antonello Didonna

Former Member
0 Kudos

HI michal ,

I HAVE USED THE CODE WHICH U SENT FOR SENDING eMAIL WITH ADOBE FORM AS ATTACHMENT.

The code which u sent is below.....

you can use the following javaScript for sending an email:

var myDoc = event.target;
  try {
    myDoc.mailDoc({
      bUI: false,
      cTo: "email",---here i want to set email dynamically...i mean a varibale which holds email
      cCC: "",
      cSubject: "Subject",
      cMsg: "..."
      });
  } catch (e) {}

I

based on employee....email will be picked and placed into the variable.

how to do this?

Regards

Arjun