What I would like to do is create a button which would prompt the user to save the file to a defined network drive\folder
and automatically put the yyyy/mm/dd prefix as the first part of the file name, the users can then add additional data to the the file name.
Is there anyway when you open a form to disable the menu options in Adobe to stop users using those when the form is open.
Thanks
Solved! Go to Solution.
To do this, you need a folder level script with a trusted function.
I have a sample form and script for this.
http://thelivecycle.blogspot.com/2009/11/save-form-to-specific-directories-and.html
Views
Replies
Total Likes
To do this, you need a folder level script with a trusted function.
I have a sample form and script for this.
http://thelivecycle.blogspot.com/2009/11/save-form-to-specific-directories-and.html
Views
Replies
Total Likes
Hi,
There is a long thread here on this topic: XFA form with button to save file with unique filename
It is not straight forward and requires a bit of scripting. Also this type of functionality is considered a security risk (hidden activity that may affect the user without the user's knowledge). So in order for this to work, you need a trusted function, which resides in a javascript file, that has to be placed in a specific folder on EVERY computer that is going to use the form. Because of this it is difficult to deploy and maintain.
You cannot disable the menus, however you can open the form to full screen, which 'hides' the menu. You would do this in the docReady event. There are some additional scripts that are also useful if using full screen. Note that it does not prevent the user from using keyboard shortcuts, like Control+S.
Hope that helps,
Niall
Views
Replies
Total Likes
it does not work with what you advised
Views
Replies
Total Likes
What doesn't work for you?
Views
Replies
Total Likes
Dear Mr. radzmar,
I am so much glad to hear from you,
Adobe livecycle is very nice software, I am learning to make some pdf forms by using this good software, and I still have some difficulties to use the functions, so I am looking through the forums, and try to follow your advise, but still not clear about which folder shall the said JS file be inserted to, so I still failed to make the “save” button working, would you be so kind to help me to solve the problem.
I want to make a pdf document, with a “save” button, which shall have the function of saving the whole pdf document named “test.pdf” in “e” drive, full name with path shall be “e:/test.pdf” automatically, without popup window.
Or if possible, by the clicking the “save” button in the document, I’d like it be saved as “e:/test.pdf” plus the date 2 day after today, for example, today is 05/09/19, so the file name will be “e:/test070919.pdf”
Thank you very much
Best Regards
BE ADO
Views
Replies
Total Likes
So first of all you'll have to download the LCB_SaveAs_3_0.js from my sample files and install it on your PC.
Then you'll have to add a button in your form with this script:
var oDoc = event.target;
cPath = "/e/";
// Build save path
cPath += "test";
cPath += util.printd("ddmmyyyy", new Date());
cPath += ".pdf";
// Call function in folder level script to save the form.
event.target.lcbSaveAs(oDoc, cPath);
Views
Replies
Total Likes
Thank you for your swift reply, however I am not able to download LCB_SaveAs_3_0.js file, when I click the hyperlink, the website can not be opened,
Views
Replies
Total Likes
Try this link: Adobe Document Cloud
HI,radzmar,
Through the link, I have downloaded the LCB_SaveAs_3_0.js file and sample, It is really nice sample file, but when I clicked LCB_SaveAs_3_0.js file to install, it showed a popup warning window, with a window script host message showing the error, row number 22, ‘app’ undefined, code 800A1391.
So the sample did not work due to the LCB_SaveAs_3_0.js file not installed. And showed the error “LCB_SaveAs_3_0.js file is not a function”
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies