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

Displaying terms of use before opening document

Frank L
Registered: Jan 5 2011
Posts: 4

Hi,
Does anybody know how to create a popup window containing "terms of use" or "license agreement" that you have to confirm, before you are allowed to open the document. (- just like the one you see, when you want to install new software on the computer)
Frank L

My Product Information:
Acrobat Pro 9.4, Windows
UVSAR
Online
Expert
Registered: Oct 29 2008
Posts: 1357
You can't do anything "before" opening the document, as scripts attached to the PDF file only run once the document's loaded into the viewer. There's no function to make pages of a non-form document hidden from the UI.

One option to create the *illusion* of protection would be to cover every page with a solid white watermark layer, and use scripting (via a popup dialog or a form button on the first page) to hide the watermark. The problem of course is that if your users have JavaScript disabled or open the file with an incompatible reader application, nothing works. It'll also cause problems with accessibility.

Another solution we've seen deployed for cases where the original document cannot be altered is to wrap the file in a custom PDF Envelope, which has the EULA written on the cover sheet along with the password to use to open the envelope. That way everyone has to read the EULA to find out what to type into the password box, and you have a positive user action between the EULA and the internally-stored file (which in some legislatures is a requirement to "accept" an agreement). It'll only work in Adobe Reader/Acrobat, you're limited in space on the cover sheet, and it takes a little bit of setting up, but the advantage is you can put anything in a PDF Envelope and once it's set up you can apply it to a file in a couple of clicks.
Frank L
Registered: Jan 5 2011
Posts: 4
Thanx UVSAR, very useful answer ;-)
My problem is, however, that I have to make sure, that users have read some conditions (- that should be shown in a popup window) before they are able to fill out the form and print it.
Isn't that possible?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
It's possible, but as UVSAR indicated the user can quite easily disable JS, causing the window not to appear.
If you don't mind about that then what you should do is embed a document-level script with the following code:

app.alert("Place the text of your message between these quotes.", 3);

This will cause said message to appear each time the file is opened.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Frank L
Registered: Jan 5 2011
Posts: 4
Yeah, I see there might be a problem here with the js. Could my problem be solved by placing a button that indicates you have read and understood the terms placed nearby a hyperlink which displays the conditions. The form shouldn't be printable before that button was clicked.
Or?
Frank L
Registered: Jan 5 2011
Posts: 4
Yeah, I see there might be a problem here with the js. Could my problem be solved by placing a button that indicates you have read and understood the terms placed nearby a hyperlink which displays the conditions. The form shouldn't be printable before that button was clicked.
Or?
UVSAR
Online
Expert
Registered: Oct 29 2008
Posts: 1357
If users disable JS (which is very common, especially in enterprise deployments) then no amount of button-pushing will achieve anything - you need scripting to control the printing or filling of forms.

If you absolutely have to make sure they have agreed to the T+Cs then an envelope is the only way unless you wrap the PDF in a deployment application (AIR, etc.) Even so there is no way to tell they actually *read* everything, and shrinkwraps are not entirely legal in many countries, but you know every user either did something conscious after reading some of your instructions, or wasn't able to access the file at all.

I've posted a demonstration file here.
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi FrankL,

You say this is a fillable form- does it have any JavaScript in it for calculations, validations, data submission, etc? If it does, then of course users who have JavaScript turned Off won't be able to use the form anyway.

One option you could use is to provide instructions on the cover page that let the user know they must have JavaScript enabled in order to use your form. An example download of this scheme can be found at-
AcroDialogs Product Page
Scroll down to the Document License Dialog Example

Hope this helps,

Dimitri
www.pdfscripting.com
www.windjack.com