Hi,
I’ve never used javascript and am pretty new to creating PDF fillable forms. But I am familiar with programming in general.
Anyway, what I want is a button a user can click which will then attach the filled PDF document (the whole document, not just the form data), add an email address, subject and message body.
I found this code online:
event.target.mailDoc({
bUI: false,
cTo: “gildedlily@sdmb.com”,
cSubject: “The Latest News”,
cMsg: “A.P., attached is my latest news story in PDF.”
});
I add it to my command button in the Run a Javascript action.
But when I click on the button nothing happens. I have 2 other buttons, both that run menu item actions (Print, Save as) and they work fine. But my javascript button does zilch. I mean, it animates fine when it’s clicked, but I get no errors or anything. Any advice? Is there a property on the document I need to change to allow javascript?
Also, while I have you here, what do you use to create fillable PDF forms from scratch? I have been using MS Word with complex tables which I then import into Acrobat. But there are always a million little tweaks I need to make after the import. That means anytime the underlying word doc needs changed, I have to make all those little PDF tweaks. And it gets old. Are there any better ways to create a fillable PDF?
Thanks!
Jeff
why don’t you formulate this problem in “hello world” terms (sort of like, based on a doc with 3 fields, one for each of the field types like text, checkbox and whatever) and post it on Craigslist or Rentacoder?
I have dabbled with this very briefly myself, but I didn’t know about javascript and used automation via a standalone C# app, much like MS Office automation via standalone app. I think it worked fine, and I am guessing that the underlying mechanism for automation and for javascript is the same. So apparently it was not a big deal.
Not sure about how you could make editing a form to be more productive. Forms are edited using Acrobat; inevitably, if you have high standards for visual outlook, you end up spending lots of time to maintain these standards. Or, maybe hire somebody else to do the boring monkey work if security issues can be dealt with.
I don’t think it really matters what software you use to create the base document - there are still a lot of tweaks needed.
I have used Word, Illustrator and Quark XPress in the past. Illustrator is my overall preference when I want a lot of control over how the form appears, but Word tends to be the fastest solution. My versions of Illustrator and Quark are extremely old at this point (before Adobe started its CS versioning), so it’s possible that there are now tools in those or InDesign that are supposed to help.
It’s also possible to build the form from the ground up in Acrobat by using text boxes and other drawing objects, but I suspect that would be pretty tedious.