These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

importTextData before distributing is somewhat of a Catch 22?

Ruizzie
Registered: Feb 20 2011
Posts: 2

Hi there,
 
I am trying to get the following to work:
 
For 50 users:
1. Prefill a PDF form with user data
2. Mail the user the form.
3. Process the returned forms
 
Seems pretty standard to me. But I am running into the following:
 
If I run the form through the 'Distribute Form Wizard', 'Extended Features' is enabled and the form is saved so I can distribute it.
 
In the saved form I call importTextData via script to get the user data, but I run into a NotAllowedError because 'Extended Features' is enabled..
 
If I remove 'Extended Features' by saving the form under a different I can run the script and for every user the form is populated and mailed.
 
But, now because 'Extended Features' is disabled, in Acrobat Reader, the form can no longer be mailed back to me.
 
I guess I am completely missing the picture on how to go about the given scenario, but this really seemed like the simplest solution to me:
 
MailThemAll = app.trustedFunction(function(oDoc) {
 
app.beginPriv();
 
MailOneUser(oDoc, 0, "user [at] host [dot] com");
MailOneUser(oDoc, 1, "user2 [at] host [dot] com");
 
app.endPriv();
 
return true;
});
   
MailOneUser = app.trustedFunction(function(oDoc, no, email) {
 
app.beginPriv();
 
oDoc.importTextData("/c/temp/deelnemers.txt", no);
oDoc.mailDoc({
bUI: false,
cTo: email,
cSubject: "Useragreement",
cMsg: "Please check your userdata and mail back the form"
});
 
app.endPriv();
 
return true;
 
});
  
Looks nice and simple if you ask me. But it's not flying because of NotAllowedError 's.
 
Any advice will be greatly appreciated (especially by this years exhibitors of the annual Sheep Shaving Fest in Nisse, Netherlands).
      

My Product Information:
Acrobat, Windows
Ruizzie
Registered: Feb 20 2011
Posts: 2
Hate to bump my own post, but I just spent another fruitless evening trying to get this to work..

Can anyone tell me the basic steps to prefill forms and e-mail them, let the user update their data, and return the form via e-mail after which the data can be collected. All this using just Acrobat Pro 9?

I keep running into NotAllowedErrors's as described in the earlier post. :-(


George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
It looks like you'll have to populate an unextended form with the data first, and then manually add the usage rights to each document. But you probably don't need to go through the Distribute process. Rather, simply add the usage rights with "Advanced > Extend Features in Adobe Reader".If it did work like you want, that would mean there's an automated way to Reader-enabled documents, and Adobe doesn't allow that with Acrobat.
maxwyss
Registered: Jul 25 2006
Posts: 255
A completely different approach would be FDF-based. You then have the option to fill the form client-side or server-side.

Client-side filling would mean to send the personalized FDF to the user. The FDF has the reference to the base form 8which may or may not be Acrobat reader-enabled; you'd have to verify if reader-enabled forms can load FDF data, however. The FDF will pull in the base PDF, and populate it. Then you have the user submit the data (as FDF or as HTML) to your server, from where you can use standard procedures to make use of the data (in the HTML submit case, there are tons of ready-made solutions out there, and FDFs are not that difficult to process, and with Adobe's FDFToolkit, you have some good utilities available).

Server-side filling would require an utility which does this, such as FDFMerge by Appligent, which would create pre-filled forms which you then can make available to the users. Processing the returned data would be the same as with client-side filling.

The advantage of the FDF-based workflows is that you don't have to bother with the limitations of Reader-enabling, because you don't really need it (for the workflow you have described). AND, it is long-time proven techology…

HTH.

Max Wyss.