Login using the username and password you created for AcrobatUsers.com.
Note: This is not the same as your Adobe ID.
Benefits of Free Membership:
Find out what AcrobatUsers.com is all about
You don't have to be a member to look at any content on the site. Increase your expertise with our helpful tutorials, videos, forums, and sample PDFs.
Like what you see? Take the next step and become a member. Register now to get discounts, attend eSeminars, ask questions and more.
Get the most out of your membership. Post in the forums, create your profile, submit to the gallery, attend a user group meeting. Log In now.
ANSWERED
I have red through all the post concerning this and to be honest I am not much smarter than when I started.
I have tried to use the example posted by radzmar which I modifed as shown below but nothing happens:
I've placed the following in the directory:
C:\Adobe\Acrobat\8.0\JavaScripts
1. The folder level JS SaveAs.js
// Defining a trusted function
var mySaveDoc = app.trustedFunction(function(doc)
{
// Check current doc name
var aDocumentFileName = this.documentFileName;
// If-Statement for ensuring, that the save fuction is only done if PDF has exactly this name
if (aDocumentFileName == "Registration Form.pdf")
{
app.beginPriv();
// Save under Users documents
var myPath = app.getPath("user", "documents") + "/" + "Registration Form" + " - " + Part1 + " - " Part2 + " - " + Part3 + " - " + ".pdf";
doc.saveAs(myPath);
app.endPriv();
}
});
2. Added JS to the click event of a button:
//Defining variable(s) used for new filename
var Part1 = resolveNode("ReportForms.#pageSet[0].Att1.#area[0].txtCompanyname").rawValue;
var Part2 = resolveNode("ReportForms.#pageSet[0].Att1.#area[0].txtCompanyID").rawValue;
var Part3 = resolveNode("ReportForms.#pageSet[0].qrr_P1.#area[0].ReportDate").rawValue;
event.target.mySaveDoc(event.target);
Can anyone tell me what I am doing wrong?
Offline

ACCEPTED ANSWER
You've got a couple of issues. First, "mySaveDoc()", because it is in a Folder Level Script, is a globally defined function. Call it directly like this:
mySaveDoc(event.target);
Next, the Part1, Part2, and Part3 variables are defined locally in the button script. They are not availible to the function. You'll need to pass these parameters as function arguments.
When the code was run it should have reported an error in the Console window. See the material on the console window in the links below.
Thom Parker
The source for PDF Scripting Info
pdfscripting.com
The Acrobat JavaScript Reference, Use it Early and Often
http://www.adobe.com/devnet/acrobat/javascript.html
Then most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)
Offline