5 Replies Latest reply on May 2, 2013 1:01 PM by Gonterman1201

    Set which pdf the fdf opens

    Level 1
      Greetings,

      I have a pdf form available online. The form has a submit function:

      this.submitForm({cURL:"mailto:abc@xyz.com?subject= Change of Info Request for "+this.getField("3_company_name").value+" #"+this.getField("1_account_number").value+"&body=Thank you for completing this form.&bcc=def@ghi.com"});
      this.resetForm();
      }}

      When the email arrives and I open the attachment, the fdf recalls the form website. However, that's not what I want it to do. I would like to recall another pdf from another location.

      Does any one know how to set the pdf which the fdf opens?

      Thanks,
      rob
        • 1. Re: Set which pdf the fdf opens
          Patrick Leckey Level 3
          You can't do that from Acrobat JavaScript. You would need a more server-based solution using the FDF toolkit so that you can set the /F tag inside the FDF file.
          • 2. Re: Set which pdf the fdf opens
            Level 1
            Thank you very much for the quick response!

            Right now our workflow is this: User fills out form located on shared drive that's print-disabled and emails to office.

            Office opens fdf file with another form that is print-enabled, prints and files it.

            This worked great because when the office worker opened the fdf, Adobe Reader asked user to navigate to source file; which they'd point to the print-enabled file.

            Now, as we try to go online and outside the office, Acrobat goes straight to the web for that print-disabled source file (as previously mentioned).

            The office workers processing this form only have Adobe Reader.

            Besides a server-based FDF solution, is there any other way of submitting a form via email?
            • 3. Re: Set which pdf the fdf opens
              Patrick Leckey Level 3
              Submit it as XML data, then open the PDF you want to import the data into in Acrobat, go to "Forms > Manage Form Data > Import Data" and import the XML that was attached to the e-mail.

              In your submitForm call, add a value as such:

              cSubmitAs: "XML"
              • 4. Re: Set which pdf the fdf opens
                Gonterman1201 Level 1

                I think you might be able to use a startup script in Acrobat. Just an idea but what if in the startup script it had a particular directory to evaluate files. If the evaluated file was fdf. Then it would append the correct /F tag into the fdf file on the open command but prior to the doc opening. Then you get the correct document. I am going to try this.

                • 5. Re: Set which pdf the fdf opens
                  Gonterman1201 Level 1
                  var myFile = File(["/Users/art5/Downloads/Acr25042696566080-22888.fdf"]);
                          myFile.open('e'); //open for append
                          myFile.seek(55,3); //seek to end of file
                          myFile.writeln("/UF(/Macintosh HD/Users/art5/Desktop/Online Art Request - KC_v2.1.pdf)>>/Type/Catalog>>endobj trailer <</Root 1 0 R>> %%EOF");
                             myFile.close();  
                  

                  So I would need a folder level script here. figuring out how to get this to run might be the trick but if I run this in the sdk it changes the directory to what I want. So I think the way to go about this is on an open command there is an evaluation of the file name. Is it a fdf file?

                  If so use its directory to change the file then go ahead and open. What do you think?