Save & Send PDF Form

Hi all,
I'm trying to program a function in my PDF form that will automaticly save the PDF form in a folder and then sends the (just saved) PDF form attached in an e-mail.
I've got the mail function working with my submit button. The only question is how can i get my PDF form to first save and then send the form?
I've treid several saving scripts but couldn't get it working.
Could you guys help me out?
Kind Regards,
Vincent
Below my code:
// Set up the recipients,subject, body, etc.
var sTo = this.getField("Unit").value;
var sBCC = "[email protected]";
var sSubject = "Nice subject";
var sBody = "Bla bla bla";
// Set the error messge to display if it doesn't work, \r = carriage return
var sErrorMsg = "Could not send email. Please make sure your email client is set up correctly.\r\r";
sErrorMsg += "Otherwise, save this file and manually attach it to an email to: " + sTo +" [email protected]";
// Email the entire document
try {
    mailDoc({
    bUI: true,
    cTo: sTo,
    cBcc: sBCC,
    cSubject: sSubject,
    cMsg: sBody
} catch(e) {
    app.alert(sErrorMsg, 1);

To save with a script, you'll have to use the doc.saveAs method. There are a number of security related issues you'll have to deal with, as discussed here: http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

Similar Messages

  • How do I purchase reader extensions to save a PDF form that has been filled out in Acrobat Reader?

    I have just discovered that in order to save a PDF form that has been electronically filled out in Acrobat Reader, that I have to purchase reader extensions to make this possible.  I would like to speak to someone about the price and how to purchase.
    I cannot find a phone number on your site, so I am hoping to get an answer from Adobe this way.
    Thanks,
    Chani

    Thanks everyone for responding.  I should have supplied more information.
    I was hired by my client to create PDF forms that can be downloaded from their website, filled out electronically in Acrobat Reader, and then saved (with all the form fields filled in) and emailed.
    I was supplied with scanned forms as the base for creating the form fields in Acrobat Pro.  These web visitors that will be filling out the forms and emailing them will only have Acrobat Reader, most likely.
    I created the forms in Acrobat Pro, and they worked great when I tested them ( in Acrobat Pro) - I could save the form field data.  However, my client has come back to me with numerous complaints from their web visitors - they cannot save the form once they have filled it out in Acrobat Reader and keep the data they have entered.  Instead, they have to print the form physically, scan it, and email it that way (kind of low tech for the year 2013, and not easy for these people).
    So, my end goal is to update these forms in Acrobat Pro so they can be filled out by folks only using Acrobat Reader and saved with the form field data intact.  Seems like a no-brainer that Acrobat Pro should have this capability without purchasing additional extensions.  However, in my research online, I have found several posts that suggest that purchasing "Reader Extensions" is the only way to enable Acrobat Pro to be able to do this.
    Can someone please clarify if I need to buy something to program these forms in Acrobat Pro to enable other people using Acrobat Reader to fill out these forms and save them with the form fields intact?
    If I do need to buy something, what is it exactly?  How do I find out clear, consise, specific information about buying it/the cost/the licensing?  I am a sole owner/employee of a graphic design firm and these forms are for my client, which is a locally-owned regional hospital.
    If this needs to move to the LiveCycle forum, fine, but I don't really know what that software is and since I'm only using Acrobat Pro (and the users, Acrobat Reader) I felt this was the appropriate place to post.
    Thanks for all of your responses!
    Chani

  • How to save a pdf form with a button on Android?

    Hello can anyone inform me with the knowledge of how to save a pdf form after filling with button on an Android device?
    What code behind the button is necessary to make this work.

    It happens automatically. You don't need any code to trigger it.

  • I have created a form but it won't let me 'save as PDF Form'

    Hi there,
    I have created a form but it won't let me 'save as PDF Form'.
    When I click the button a timer appears then disappears without creating the pdf form.
    I have created forms previously and not had this problem before.
    Thanks

    Are you using the FormsCentral desktop application or FormsCentral in a web browser?
    I would try the things recommended in this FAQ, the issue is different but the fix is likely similar:
    http://forums.adobe.com/docs/DOC-4141
    You can also try sharing your form with me to see if I can save PDF, that would tell us if it is a (very rare) issue with the form or on your system.  If you'd like, share with [email protected] and please include a reference to this Forum post so I know what we are looking for, instructions for sharing your form: http://forums.adobe.com/docs/DOC-2462
    Thanks,
    Josh

  • When I save as PDF form, my logo dissapears from header

    The header has an image that dissapears when I save as PDF form. Please help

    Please check if your form falls within the scenarios described in this document: https://forums.adobe.com/docs/DOC-4144.
    Thanks,
    Wenlan

  • How to save to PDF form View Responses tab without including blank fields?

    Is there a way to save in PDF form from View Responses withouth including blank fields? More specifically, my form has several fields that have action (Show/hide) depending on the values. Once form is submitted and I am reviewing it from View Response tab, I use "save as PDF" button to save/download my completed form, however when I open it, it shows blank fields as well. Is there a way to somehow specify not to include blanks. If there is no way it would be a nice feature to have. Please let me know.

    No, the PDF is always going to show all fields, the "Show/Hide" does not affect the PDF we generate.
    I will soon post a Form for users to submit feature requests, keep your eyes out for an announcement in the forums for it and you can submit this request.
    Thanks,
    Josh

  • How to save Fillable PDF form created in XI - So Acrobat Reader can fill out and send back

    Hi, Im extremely hopeful someone can help me with this question, Ive had extreme luck with this question site, you have all been amazing.
    I have created a fillable form in Adobe Acrobat XI and I have saved my work and Im ready to send the form to my client.
    I have been told that I need to save my file in a manner that the general public that does not have Acrobat XI, and mainly has acrobat reader, will be able to open, fill my form out, and send back to me completed.
    How do I do this.
    Ive run a couple tests with coworker and its not allowing the saving of the information that she filled out.
    Does anyone know how I need to save and distribute this form so I get it back filled out from my clients? that probably have only reader?
    thanks in advance for your help.
    Amy

    I think I figured this out???? My pdf tester has gone to bed, so hopefully I will know by morning if this is my solution......
    Open the PDF in Acrobat XI (the form you have saved that is ready to be filled out to whoever you distribute the form to).
    Choose Advanced > Enable Usage Rights in Adobe Reader (Acrobat 8/9) (if you have XI do not do this step, but do step 4 for XI)
    or
    File > Save As >Reader Extended PDF > Enable Additional Features (Acrobat X) (Its actually not in save as, but in save as other)
    Save the PDF using a different file name, you will be using this new file to be the file you will distribute.
    When you now open the PDF in Adobe Reader you will be able to fill the form and save the data and then send it back to the author that is requesting the form to be filled out.

  • How do you Save a pdf form automatically to a designated folder using designated fields in the form?

    Hello,
    I am in the process of creating a “service excellence feedback” form.  The idea of this form is to have a blank form living in our company’s intranet page to be used by multiple departments that receive feedback and then have a chain of updated investigations and follow up to be documented within the same file.              
    The top portion is to be filled out by the department receiving the feedback. It collects all the pertinent data needed including the person giving the feedback’s First and Last name. Once the top portion of the form is filled out I want to have a “submit” button that will do; 
    1. Save the pdf automatically to a designated folder AND automatically save it under the last and first name that is entered in the form. So the form will be saved in the designated folder under “Smith, John.pdf”.  I have already figured out how to format the button to “save as” however I would like to eliminate the person filling the form out to have ANY responsibility to naming and saving the file to the correct folder. 
    2. After it is saved I want it emailed to a specific email address (which I have figured out.)              
    Once the steps above are completed and it is emailed an investigation will be performed by me and I will document my findings and then send it by another “submit” button which will save the document (writing over the previously saved version with this new version) and then emailed on to the next person to provide the next step of follow up. When the next person in line finishes they will hit another “submit” button that will again save the new version and send it back to me.  We continue this back and forth with a few more follow-ups performing the same save and send options.                  
    I need help in how to write a script/java to perform this task of saving. I have already figured out how to program the button to email the form.  Help please!!!  I am using Adobe Acrobat XI Pro

    It can also work if you certify the document and each user chooses to trust it to execute privileged JavaScript, which may be feasible in this setting. The method you'd use is doc.saveAs: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.524.html
    Also, read the following tutorial: http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

  • Save a PDF Form to KM

    Hi all!! I've created an interactive form in a WebDynpro and I need this form to be save in KM.
    So I need to convert my form to some format, in java is Byte[], in ABAP I don't know what the format is. Then send it to a Web Service that is already created..
    Can someone give me tips to look for them? or if someone did this, send me the code please...
    Thanks.

    Hi Manish
    just a bit of rather high-level input: What you want is possible from a technology point of view, i.e. NetWeaver provides you with all the tools you need, but essentially you need to build an application that does all the things you want from scratch.
    Interactive Forms has no standard persistence mechanism for the generated PDF forms, as the way such PDFs are handled differ from app to app, from customer to customer, and NW isn't able to accommodate all wishes. Some of the SAP applications provide mechanisms sich as storing files in KM or Records Mgmt, but this is limited.
    You will need an application that
    - generates the PDF
    - assigns the PDF to a KM folder (after editing?)
    - allows the retrieval of the PDF from KM and editing
    - presumably, at some point send the data entered in the PDF back to the database (before archiving the PDF permanently?)
    So the forms aspect is only one of the important ones, developing on top of KM the other.
    Best regards,
    Markus Meisl
    SAP NetWeaver Product Management

  • Sending PDF forms (created using SFP) as Email Attachment

    Hi,
         I have created bunch of ADOBE forms using SFP. They are not interactive forms. created using ADOBE Live cycle designer.
    I have the Function module and by executing I can view the PDF form in print preview mode. But I have to save this in backend and attach to email.
    I have a program that have to send one of the forms created in SFP as email attachment to outside SAP.
    Please advice how to achieve this.
    Thanks,
    Sanjeev

    Hi ,
    Please find below a code sample for your requirement
    *& Report  ZENVOI_PDF_MAIL
    REPORT  zenvoi_pdf_mail MESSAGE-ID ad.
    TYPE-POOLS : abap .
    DATA : data_for_update TYPE zdemopdf ,
           hexa            TYPE solix_tab.
    DATA : fm_name   TYPE funcname ,
           param     TYPE sfpoutputparams,
           doc_param TYPE sfpdocparams ,
           output    TYPE fpformoutput .
    param-nodialog = abap_true. " suppress printer dialog popup
    param-getpdf = abap_true.
    doc_param-langu = sy-langu.
    doc_param-country = 'FR'.
    doc_param-fillable = abap_true.
    doc_param-dynamic = abap_true.
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
      EXPORTING
        i_name     = 'ZDEMO_PDF'
      IMPORTING
        e_funcname = fm_name.
    CALL FUNCTION 'FP_JOB_OPEN'
      CHANGING
        ie_outputparams = param
      EXCEPTIONS
        cancel          = 1
        usage_error     = 2
        system_error    = 3
        internal_error  = 4.
    CHECK sy-subrc EQ 0.
    CALL FUNCTION fm_name
      EXPORTING
        /1bcdwb/docparams  = doc_param
        data_for_update    = data_for_update
      IMPORTING
        /1bcdwb/formoutput = output
      EXCEPTIONS
        usage_error        = 1
        system_error       = 2
        internal_error     = 3.
    CALL FUNCTION 'FP_JOB_CLOSE'
      EXCEPTIONS
        usage_error    = 1
        system_error   = 2
        internal_error = 3
        OTHERS         = 4.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer     = output-pdf "PDF file from function module
      TABLES
        binary_tab = hexa.
    * Envoi du mail
    ** CLASS-DEFINITIONS
    DATA: send_request       TYPE REF TO cl_bcs.
    DATA: document           TYPE REF TO cl_document_bcs.
    *DATA: sender             TYPE REF TO cl_sapuser_bcs.
    data: sender            TYPE REF TO if_sender_bcs.
    DATA: recipient          TYPE REF TO if_recipient_bcs.
    ** INTERNAL TABLES
    DATA: l_mailtext TYPE soli_tab.
    DATA: iaddsmtp   TYPE TABLE OF bapiadsmtp.
    DATA: ireturn    TYPE TABLE OF bapiret2.
    ** VARIABLES
    DATA: mail_line  LIKE LINE OF l_mailtext.
    DATA: bapiadsmtp         TYPE bapiadsmtp.
    DATA: subject    TYPE so_obj_des.
    DATA : att_subject TYPE so_obj_des.
    DATA : w_except TYPE REF TO cx_root .
    CONSTANTS : c_defmail TYPE ad_smtpadr VALUE
                     '[email protected]' .
    FIELD-SYMBOLS : <smtp> TYPE bapiadsmtp.
    *Set subject of the mail
    subject = 'Exemple de PDF interactif'.
    * Set text of the mail
    mail_line = 'Merci de remplir le formulaire et nous le retourner'.
    APPEND mail_line TO l_mailtext .
    att_subject = 'Template du PDF'.
    TRY.
    * Create persistent send request
        send_request = cl_bcs=>create_persistent( ).
    * Get sender object
        sender = cl_sapuser_bcs=>create( sy-uname ).
    *    sender =
    *      cl_cam_address_bcs=>create_internet_address( '[email protected]' ) .
    * Add sender
        CALL METHOD send_request->set_sender
          EXPORTING
            i_sender = sender.
    * Read the E-Mail address for the user
    *    CALL FUNCTION 'BAPI_USER_GET_DETAIL'
    *      EXPORTING
    *        username = sy-uname
    *      TABLES
    *        return   = ireturn
    *        addsmtp  = iaddsmtp.
    *    LOOP AT iaddsmtp ASSIGNING <smtp> WHERE std_no = 'X'.
    *      CLEAR bapiadsmtp.
    *      MOVE <smtp> TO bapiadsmtp.
    *    ENDLOOP.
    *    CASE bapiadsmtp-e_mail.
    *      WHEN space.
            recipient =
         cl_cam_address_bcs=>create_internet_address( c_defmail ).
    *      WHEN OTHERS.
    *        recipient =
    *     cl_cam_address_bcs=>create_internet_address( bapiadsmtp-e_mail ).
    *    ENDCASE.
    * Add recipient with its respective attributes to send request
        CALL METHOD send_request->add_recipient
          EXPORTING
            i_recipient  = recipient
            i_express    = 'X'
            i_copy       = space
            i_blind_copy = space
            i_no_forward = space.
    * Set that you don't need a Return Status E-mail
        CALL METHOD send_request->set_status_attributes
          EXPORTING
            i_requested_status = 'E'
            i_status_mail      = 'E'.
    * set send immediately flag
        send_request->set_send_immediately( 'X' ).
    *Build Document
        document = cl_document_bcs=>create_document(
                            i_type    = 'RAW'
                            i_text    = l_mailtext
                            i_subject = subject ).
    *     add attachment to document
        CALL METHOD document->add_attachment
          EXPORTING
            i_attachment_type    = 'PDF'
            i_attachment_subject = att_subject
            i_att_content_hex    = hexa.
    * Add document to send request
        CALL METHOD send_request->set_document( document ).
    * Send document
        CALL METHOD send_request->send( ).
        COMMIT WORK.
      CATCH cx_send_req_bcs INTO w_except.
      CATCH cx_address_bcs INTO w_except.
      CATCH cx_document_bcs INTO w_except.
    ENDTRY.
    Hope this help you .
    Best regards

  • Send PDF form IPad document doesnt appear in email.

    I use the Ipad for sending PDF's to clients and internal coworkers
    the emial looks like it makes it out looking at the sent mail from the ipad
    but the attachment is compromized - outlook user says "no attachment"
    If I save a draft of the email first often the sent PDF file will make it thorugh - but not always.
    This was the last issue
    - This is what I see in my "out box" in outlook on the PC
    On the Ipad - every thing looks great.
    What is the problem - ibooks - email on  Ipad.- What are your sugestions.

    My final solution was to post the form and offer a link to dowload/install Adobe Reader and to also offer a link for Chrome users.
    * I will continue to look for a better solution, but at least the above is functioning.
    **I also set my bUI to true.
    Many thanks, Tim
    P.S.  I did report this to Google Chrome, heard nothing yet.  Also if you think of a better solution let me know.  I'm not familiar with javascript........I have a better understanding of HTML.......if this were HTML I would have done the below.
    <html>
    <body>
    <script type="text/javascript">
    alert("this is an alert");
    function go() {
                    alert("Hi");
                    var location = document.getElementById("location").value;
                    //console.println("location: = " + location);
                    var email = "";
                    email = "[email protected]";
                    if (location == "Select a location")
                                                    alert("You need to select a location first");
                    else if (location == "Other")
                                    email = "[email protected]";
                    if (email != "")
                                    //this.mailDoc({bUI:true,cTo:email,cSubject:location,cMsg:"Completed Employee Appointment Request Attached"});
                                                    window.open('mailto:' + email + '?subject=' + encodeURIComponent(location));
    </script>
                    This is a test
                    <input type="text" id="location" value="Select a location">
                    <input type="button" value="submit" onclick="go()">
    </body>
    </html>

  • Send PDF form to FTP server folder

    I am not sure if this is possible, but one of my clients wants it, so I'm checking. They have a PDF form set up that currently sends the attachment via the user's email program. My client doesn't like that. So they want it to when a user fills out the PDF and submits it, the filled out PDF is sent to an FTP folder they can access. Is it possible to send a PDF to a specified FTP folder? If so, what all would be needed?
    Thanks

    Not possible. You can submit to a web server, which can then save the file somewhere, but this would involve some programming.

  • Send PDF form to e-mail as attachment with a PHP script on the server

    Hi,
    For several days I've been searching though the internet looking for a solution, a quite simple one in my opinion, but I got a little desperate not getting any result I want.
    Okay. The Situation.
    I have a PDF form to order sandwiches and drinks.
    The PDF has serveral area's and columns where customers fill in the amount of the products they would like to order.
    At a position of a field, the kitchen can almost blindly see what products a customer ordered.
    Therefore, when someone fills in the form, I want to send the filled PDF by e-mail to the kitchen's e-mail adress. And important: the PDF in the kitchen's mailbox should be completely identical to the form the customer filled in.
    So, I have an Order button in my form. I set the action as 'Submit a form'.
    In the settings under 'Enter a URL for this link' I used just some PHP mailer script I also use on my website contact form.
    IF I check 'HTML' under 'Export Format' the PHP mailer works fine. I receive an HTML e-mail listed the ordered products.
    BUT
    I do want the original filled PDF in my mailbox instead of an HTML e-mail.
    So, for 'Export Format' I checked 'PDF The Complete Document'.
    But then my PHP mailer script doesn't work anymore.
    It gives errors like 'no valid e-mail adres' , etcetera etcetera.
    Who has a solution?
    Who has a working standard PHP script for me what just sends the kitchen an empty mail with the original PDF as attachment?!
    There is no need to use any database or other more complex functionality. Just mail the filled PDF.

    You can submit whole PDF format as long as you enable usage rights on the PDF.
    Normally Adobe Reader users can only submit the data, XFDF, FDF, XDP, XML.
    To enable usage rights on the PDF you will need to use Adobe Acrobat Std/Pro.
    As for the PHP Script; it depends on your PHP web server capabilities.
    The script will be slightly different, if the server uses PHP Mail or PHP PEAR.
    Just attach the submission to an email and send.
    If the client is submitting the form from a standalone pdf reader app, you can also respond with a success or failure FDF \status message; otherwise, you can redirect to a success / failure URL.
    For more information and online examples:
    http://www.pdfemail.net/examples/

  • Error reads "Cannot save information" when trying to save my pdf form on another computer

    Can anyone tell me what I have done wrong in the creation of my PDF form.   When we try to open it on another PC it comes up with another window which reads as follows:
    Cannot Save Form Information
    PLEASE NOTE:   You cannot save a competed copy of this form on your computer.
    If you would like a copy for your records, please fill it in and print it.
    If anyone can help me, I would be greatly appreciative !
    Thanks,
    Robert

    That message shouldn't show up if you use Reader 11 or DC, unless the form was created with LiveCycle Designer. It also won't happen in Reader if you Reader-enable the form in Acrobat. To do so with Acrobat 11 select:
    File > Save As Other > Reader Extended PDF > Enable More Tools
    The specific menu items are different for every other version of Acrobat.

  • How to get an Adobe trusted function javascript to save a pdf form even if fields are empty?

    I have a form I have created in Livecycle designer which I want to save to a specific location using a combination of specific fields in the form. I have been able to do this by writing a trusted function and putting it in the adobe javascript file and then putting some code on a save button in the form. However, it may be that some of the fields (vfirstname and vsecondname) may be blank and i still want the form to save. Ideally i want to write an if statement to substitute those fields for other fields if they are blank but cant get the code to  work.
    Working code in trusted function file
    // SaveAs Function1 var mySaveDoc = app.trustedFunction(function(doc) { app.beginPriv(); var vDate1 = event.target.xfa.resolveNode("form1.page1.Table1.Row1.leftsideofform.Timeanddate.Dateofca ll").rawValue.toString(); var vfirstname = event.target.xfa.resolveNode(" form1.page1.Table1.Row1.rightsideofform.Prospectiveclient.ClientFirstname").rawValue.toSt ring(); var vsecondname = event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Prospectiveclient.C lientsurname").rawValue.toString(); var myPath = "/MGLCC01-SV/MGPdata/Mihomecare/testce/" + vDate1 +"_" + vfirstname + "-" + vsecondname + ".pdf"; // saveAs is the only privileged code that needs to be enclosed doc.saveAs({cPath: myPath, bCopy: true, bPromptToOverwrite: true}); app.endPriv(); }); 
    Working code on save button in form
    form1.#pageSet[0].Newenquirymasterpage.Button1::mouseUp - (JavaScript, client) var txt = form1.execValidate(); //This script will validate all required fields event.target.mySaveDoc(event.target) xfa.host.messageBox("Document has been saved to shared drive", "File Saved", 3, 1); 
    IF code for trusted function file that I cant get to work
    // SaveAs Function1 var mySaveDoc = app.trustedFunction(function(doc) { app.beginPriv(); var vDate1 = event.target.xfa.resolveNode("form1.page1.Table1.Row1.leftsideofform.Timeanddate.Dateofca ll").rawValue.toString(); if (event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Prospectiveclient. ClientFirstname").rawValue == " ")      {          var vfirstname = event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Enquirer.EnquFirstn ame").rawValue.toString();      }      else      {          var vfirstname = event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Prospectiveclient.C lientFirstname").rawValue.toString();      }     if (event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Prospectiveclient. Clientsurname").rawValue == " ")      {          var vsecondname = event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Enquirer.Enqsurname ").rawValue.toString();      }      else      {          var vsecondname = event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Prospectiveclient.C lientsurname").rawValue.toString();      } var myPath = "/MGLCC01-SV/MGPdata/Mihomecare/testce/" + vDate1 +"_" + vfirstname + "-" + vsecondname + ".pdf"; // saveAs is the only privileged code that needs to be enclosed doc.saveAs({cPath: myPath, bCopy: true, bPromptToOverwrite: true}); app.endPriv(); }); 
    Can anyone suggest why the If code above doesn't work? or how i could get the form to submit even if the fields are blank?

    It can also work if you certify the document and each user chooses to trust it to execute privileged JavaScript, which may be feasible in this setting. The method you'd use is doc.saveAs: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.524.html
    Also, read the following tutorial: http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

Maybe you are looking for