Submit a PDF form by email

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
Pat Verner
Earned a small fee
Earned a small fee
Posts: 16
Joined: Mon Sep 06, 2010 6:58 am

Submit a PDF form by email

Post by Pat Verner »

I use wxPdfDocument for a number of small applications, including generating membership cards, various reports, etc.
I now have the need to generate a specific application form that can be placed on a web site, and which can be completed and then emailed back to me. The principle is exactly the same as the jsform.cpp in the samples/minimal directory, but instead of printing the form I want it submitted by email to a specific address. I presume that javascript can be used for this purpose, but my knowledge of javascript is null!.
Some hints or suggestions would be appreciated.
Regards
=Pat
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Submit a PDF form by email

Post by utelle »

Pat Verner wrote:I use wxPdfDocument for a number of small applications, including generating membership cards, various reports, etc.
I now have the need to generate a specific application form that can be placed on a web site, and which can be completed and then emailed back to me. The principle is exactly the same as the jsform.cpp in the samples/minimal directory, but instead of printing the form I want it submitted by email to a specific address. I presume that javascript can be used for this purpose, but my knowledge of javascript is null!.
Some hints or suggestions would be appreciated.
I don't have deeper Adobe JavaScript knowledge either. However, you might find information in the Adobe JavaScript Reference or on the Adobe Community Forum.

Depending on your actual requirements it may not be easy to accomplish (i.e. see http://forums.adobe.com/thread/286054).

You may try to experiment with JavaScript method doc.mailForm. Following is an extract from the Acrobat JavaScripting Guide:
Emailing Completed Forms
To email a completed form in FDF format, invoke the doc object’s mailForm method, which exports the data to FDF and sends it via email.
To make an interactive email session, pass true to the first parameter, which specifies whether a user interface should be used, as shown in the code below:
this.mailForm(true);
To send the exported FDF data automatically, pass false to the first parameter, and specify the cTO, cCc, cBcc, cSubject, and cMsg fields (all of which are optional), as shown in the code below:
this.mailForm(false, "[email protected]");
Hope this helps.

Regards,

Ulrich
Pat Verner
Earned a small fee
Earned a small fee
Posts: 16
Joined: Mon Sep 06, 2010 6:58 am

Re: Submit a PDF form by email

Post by Pat Verner »

Thank you, you have given me a lot of info to follow up on.
Regards
=Pat
Post Reply