Skip to main content
Inspiring
July 16, 2021
Answered

Save PDF File with Form Button

  • July 16, 2021
  • 3 replies
  • 2814 views

Hi Everyone...

 

As I continue developing my CEQA Form (attached), I am now attempting to have a button (visible/not printing) so that the file can be saved using the Case Number created on the form. I am honestly in the deepwater here...

 

I have read, re-read, and yet, re-read again Thom Parker's excellent article (https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript) on how to get this done....but I want to make sure I am getting it.

 

I have attached a file that I think is what I have to get done...

 

1. create a java file that sits on the server-side in a folder accessible by the network users.

2. reference that file in the PDF form (not sure how that works)

3. create a button script that acts on privileged features to save the file with the form-generated filename.

 

What am I missing?

 

Cheers!

This topic has been closed for replies.
Correct answer Robert Ooley

Thanks.

 

try67...

 

I cannot be sure that each local machine will allow the script to be installed and it would be easier to get an audience with the Pope than it would be to get Corporate IT to push it through as an update to all network devices.

 

As an alternative, I suppose I could pop an alter with instructions to use the Case Number as file name prior to calling a menu feature...

3 replies

Legend
July 17, 2021

I think you're trying to do it in a particular way and twist the instructions to fit. No, you have to do things in the very particular way that Adobe designed. Yes, it is a nuisance.

"1. create a java file" that's JavaScript. If you mix the two up you will get a lot of confusing info.

"that sits on the server-side in a folder accessible by the network users." no, it sits in each user's personal Acrobat start up dir.

"2. reference that file in the PDF form (not sure how that works)" What you describe can't be done. But the startup file can make a trusted function.

"3. create a button script that acts on privileged features to save the file with the form-generated filename." 

Really, it seems you actually need a submit button and a server script (written by a professional specialist). But you can refer to the trusted function in a button if you really want.

Inspiring
July 17, 2021

Thanks, TestScreenName. I appreciate your thinking about my file saveas issue.

try67
Community Expert
Community Expert
July 17, 2021
quote

1. create a java file that sits on the server-side in a folder accessible by the network users.

By @Robert Ooley

 

No, that's not how it works. The js file needs to be placed in one of two specific folders on the local machine of each user. Is that possible in your scenario?

Robert OoleyAuthorCorrect answer
Inspiring
July 17, 2021

Thanks.

 

try67...

 

I cannot be sure that each local machine will allow the script to be installed and it would be easier to get an audience with the Pope than it would be to get Corporate IT to push it through as an update to all network devices.

 

As an alternative, I suppose I could pop an alter with instructions to use the Case Number as file name prior to calling a menu feature...

try67
Community Expert
Community Expert
July 17, 2021

Sure, you can do that. You can even display for them the file-name they should use, so they could copy and paste it into the Save As dialog, but you can't enforce it.

Bernd Alheit
Community Expert
Community Expert
July 17, 2021

You must use a trusted function.