Skip to main content
New Participant
July 23, 2008
Question

How send filled form via email in PDF format not XML when button clicked

  • July 23, 2008
  • 17 replies
  • 684659 views
This topic has been closed for replies.

17 replies

New Participant
February 16, 2014

//@@SUBMITURL "mailto:abc@xyz.com?subject=Submitting Completed Form&body=Instructions to add this form to a responses file:\n1. Double-click the attachment.\n2. Acrobat will prompt you to select a responses file.&ui=false"

/**************************************************************

AdobePatentID="B643"

**************************************************************/

var AdobePatentID = "AdobePatentID=\"B643\"";

// initiate some constants

var METADATA_ANNOT_NAME     = "adhocFormState";

var PROP_RESPONDENT_NAME    = "respondentName";

var PROP_RESPONDENT_EMAIL   = "respondentEmail";

var currentDoc;

if (typeof(xfa) == "object")

    currentDoc = event.target;

else

    currentDoc = this;

// Only on Viewer/Reader older than 9.0, we'll do the following tasks.

var bAnonymous = false;

var bContinue = true;

if (app.viewerVersion < 9.0) {

    // show the email/name dialog if not anonymous

    if (!bAnonymous && !currentDoc.dynamicXFAForm) {

        var result = currentDoc.askUserIdentity(currentDoc);

        if (result == null)

            bContinue = false;

        else {   

            var annot = currentDoc.getAnnot(0, METADATA_ANNOT_NAME);

            if (annot != null) {

                var arrProps = new Array();

                arrProps = annot.contents.split(";");

                currentDoc.setProperty(arrProps, PROP_RESPONDENT_NAME, result.name);

                currentDoc.setProperty(arrProps, PROP_RESPONDENT_EMAIL, result.email);

                annot.contents = arrProps.join(";");

            }

        }

    }

    // show the select client dialog

    if (bContinue) {

        var result = currentDoc.askEmailClient(currentDoc);

        if (result == null)

            bContinue = false;

        else if (!result.send)  {

            app.execMenuItem("SaveAs");

            bContinue = false;

        }

    }

}

// submit the form

if (bContinue) {

    var rawURL = "abc@xyz.com?subject=Submitting Completed Form&body=Instructions to add this form to a responses file:\n1. Double-click the attachment.\n2. Acrobat will prompt you to select a responses file.&ui=false";

    var submitURL;

    if (app.viewerVersion < 9.0)

        submitURL = "mailto:" + rawURL;

    else

        submitURL = "mailto:" + escape(rawURL);

    currentDoc.submitForm({

        cURL: submitURL,

        cSubmitAs: "PDF"

    });

}

New Participant
November 24, 2014

I've used this code in the past for creating and distributing forms, however I'm now having problems with updating the email address to a new recipient.

I created an updated PDF and have changed the mailto in the first line and down the bottom to the new recipient, however when I distribute it, the old email is still there!

Is there anywhere else I need to be updating the mailto for this to change over to the new recipient?

Thanks in advance!

New Participant
April 13, 2011

I need the submit button to send me the email without the client side email program poping up.  I want it to work like a form submit buttom only I want the pdf file sent to my email.  The mailto: option calls the email client.  Is their a server side script or way to do this I'm using acrbat 9 pro.

Brainiac
April 14, 2011

You would use the submitForm() method, and there you have the option to send it as PDF.

Then you would have to set up your server to either send you a notification mail that you can download the received PDF, or have it sending you the PDF.

For those server-side scripts, you'd have to dig around a bit.

HTH.

Max Wyss.

New Participant
August 25, 2010

I'm using Adobe LiveCycle Designer 8.0 and have the same problem.

I changed the line <submit format="pdf" textEncoding="UTF-8" target="mailto:"/> and nothing happened

Can anybody helpme pl

New Participant
March 31, 2010

Years late, I know. But I'll post this for others

like me who founds this thread while googling for an anwser.

What I finaly did:

Found the line:

<submit format="xml" textEncoding="UTF-8" target="mailto:"/>

changed it to:

<submit format="pdf" textEncoding="UTF-8" target="mailto:"/>

resaved document, and it worked.

New Participant
April 8, 2010

"Found the line:

changed it to:

<submit format="pdf" textEncoding="UTF-8" target="mailto:"/>

resaved document, and it worked."

------------------------------------------

Thank you !!!!!!!!!!

<submit format="xml" textEncoding="UTF-8" target="mailto:"/>

New Participant
January 10, 2009
another question on this topic
In the previous answer to the question regarding the form receiver only having Adobe Reader and not being able to open the XML form:
"
Please note: Unless you enable the form through an Adobe LiveCycle Reader Extensions Server, people who only have Reader WILL NOT be able to submit the form if it is set to submit in PDF format, since that operation requires save rights. "

Can I accomplish this(enabling A LC Reader Extensions Server) on my (the form designer's) end? How?
New Participant
November 18, 2008
I'm having the same issue... I do not have a space between mailto:email@address.com

I am using Adobe LifeCycle Designer 7.1 and Adobe Acrobat 7.0.

I'm getting the error message: "This operation is not permitted."

Any help would be appreciated!
Patrick_Leckey
Participating Frequently
October 6, 2008
> mailto: email@adress.com

There should be no space between 'mailto:' and the address.
New Participant
October 6, 2008
I am currently working with Adobe LiveCycle Designer 7.1 and Adobe Acrobat 7.0 and my issue is that I am trying to send a form via mail in PDF-Format.

I use a regular button with the the Control Type:Submit and the Submit Format: PDF and then to Submit to URL: mailto: email@adress.com
I receive a Notice that says: This operation is not permitted.

What am I doing wrong?
Patrick_Leckey
Participating Frequently
September 7, 2008
It still exists on the same "Object" tab as in Designer 7. You have to create a regular button, not an e-mail button, change the type to submit, then on the Submit tab choose the submit type as PDF.

Please note: Unless you enable the form through an Adobe LiveCycle Reader Extensions Server, people who only have Reader WILL NOT be able to submit the form if it is set to submit in PDF format, since that operation requires save rights.
New Participant
September 6, 2008
I know there used to be a way to do it on Designer 7. I think there were three options in the Object panel for "what type" of data to send. I am not finding it in Designer 8. Yes it'll take you some scripting if you want to handle to XML, but you can use whatever you got, practically, and it'll work. If you want that E-mail button to work , your audience MUST HAVE an e-amil software client (like OUTLOOK/Entourage) configured on their machine (most do not). Still, I want to know where the "send as PDF" functionality went???