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

showing a message when a PDF is opened

h_c_87
Registered: Feb 1 2010
Posts: 24
Answered

We want a message to be shown("Please call the department at extension X3333 if you don't have the password to access this document") when a user tries to open a password protected PDF document.

This needs to be done for some 700 files. How can I do this as a batch process?

Any advice would be welcome.

We have Acrobat Professional 9.0 on Win XP

I did a quick search in the forum, but did not find anything relevant because I used the wrong search terms or because I looked at the initial few pages of result only.

My Product Information:
Acrobat Pro 9.0, Windows
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
You can't do it. If the user doesn't have the "open" password, the file is not opened and Reader cannot even decrypt the contents - so there's no way for any instructions within that file to be followed.
h_c_87
Registered: Feb 1 2010
Posts: 24
UVSAR wrote:
You can't do it. If the user doesn't have the "open" password, the file is not opened and Reader cannot even decrypt the contents - so there's no way for any instructions within that file to be followed.
Perhaps, I did not explain what I wanted clearly.

My bank sends me a electronic statement via email. When I try to open it, I get a text box which has a message "This document is password protected. Please enter a Document Open Password" and some blank area where I can enter the password. If I enter the right password, the document opens fine.

I want the message to be "Please call the department at extension X3333 if you don't have the password to open this document"

It is not instructions within that file which need to be followed. All I want is to display a message.

Can that be done?

Thanks
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
As I said - no. The dialogs displayed by Acrobat and Reader are part of the software as installed, and users cannot alter them.
h_c_87
Registered: Feb 1 2010
Posts: 24
UVSAR wrote:
As I said - no. The dialogs displayed by Acrobat and Reader are part of the software as installed, and users cannot alter them.
Thanks for clarifying that.

Is there another method to achieve what I want?

Can we use Javascript? I mean allow the user to open a document which would appear blank, run some Javascript when the document is opened which would ask the user for a password along with a message to call a office if they don't know the password. On entering, the right password the contents of the document would be displayed?

I mean can using Javascript, can the text font be set to white so the document appears as blank when the document is opened. Then, when the user enters the right password, the text font is set to black allowing the user to view the contents?

I am a complete newbie so don't know if that can be done or not.

Thanks for your time and help.
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
Not in any realistic way, no. Sorry.
h_c_87
Registered: Feb 1 2010
Posts: 24
UVSAR wrote:
Not in any realistic way, no. Sorry.
Thanks for the response.

Can you please point me to a link which explains the different ways a PDF document can be protected?

I can go through it and see if there are any other options which we can choose.

I saw the link at https://createpdf.adobe.com/cgi-feeder.pl/ppdf_faq#whatIsPpdf

The Adobe PDF service(which is in beta) does some extent to what we want. Initially, we wanted users to access the document only if they enter their organization's email address and password(password used to access their company email). The web team did not help us in configuring it.
So, we have to look at options like this.


Thanks for your time and suggestions.
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi h_c_87,

You could do this with a custom dialog and layered PDF but the solution definitely fits into the advanced category of tasks. It would involve creating a custom dialog with your message and a text box to enter some form of key/password that will be shown when the PDF is first opened- if the user knows the key and then clicks OK in the dialog the blank cover sheet would turn off and they would be able to see the real content in another layer. We've got an example of doing this called the "Document License Dialog Example" and you can download and try it out from this page-
http://www.windjack.com/product/acrodialogs/
(Link for the file is mid-page)

Of course, as mentioned above this will not work if the PDF has a password applied to it using the Acrobat Security features because the custom dialog will not render if the PDF is protected using the built-in password features of Acrobat.

This is also not a completely foolproof security method, just a good deterrent. So whether that works for you depends on just how strict your security needs are.

Hope this helps,

Dimitri
WindJack Solutions
www.windjack.com
www.pdfscripting.com
h_c_87
Registered: Feb 1 2010
Posts: 24
Dimitri wrote:
Hi h_c_87,You could do this with a custom dialog and layered PDF but the solution definitely fits into the advanced category of tasks. It would involve creating a custom dialog with your message and a text box to enter some form of key/password that will be shown when the PDF is first opened- if the user knows the key and then clicks OK in the dialog the blank cover sheet would turn off and they would be able to see the real content in another layer. We've got an example of doing this called the "Document License Dialog Example" and you can download and try it out from this page-
http://www.windjack.com/product/acrodialogs/
(Link for the file is mid-page)

Of course, as mentioned above this will not work if the PDF has a password applied to it using the Acrobat Security features because the custom dialog will not render if the PDF is protected using the built-in password features of Acrobat.

This is also not a completely foolproof security method, just a good deterrent. So whether that works for you depends on just how strict your security needs are.

Hope this helps,

Dimitri
WindJack Solutions
www.windjack.com
www.pdfscripting.com
Hi Dimitri,

Thanks for your response. Yes, it was helpful.

The example "Document License Dialog Example" does what I want.

How difficult would it be for me to do it for one file and then 700 files? Can you please point me to some guide/tutorials? I looked at www.pdfscripting.com and it was helpful.

Can you please advise?

Thanks
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi h_c_87,

This is not an easy task and will require some advanced skill with Acrobat, scripting, and writing a custom Batch Process. Once you create the dialog and cover sheet you could do this in a Batch to the other files though.

I do not know of any tutorials or guides for the complete solution, but there is a tutorial in the Learning Center here on working with OCGs (option content groups = layers) which is the cover sheet part, and you can download a free trial of my company's Acrobat plug-in "AcroDialogs" to try out creating a custom dialog with your message and text box. But no step-by-step that I know of- something like that would be a good addition for pdfscripting.com.

Hope this helps,

Dimitri
WindJack Solutions, Inc
www.pdfscripting.com
www.windjack.com
h_c_87
Registered: Feb 1 2010
Posts: 24
Dimitri wrote:
Hi h_c_87,This is not an easy task and will require some advanced skill with Acrobat, scripting, and writing a custom Batch Process. Once you create the dialog and cover sheet you could do this in a Batch to the other files though.

I do not know of any tutorials or guides for the complete solution, but there is a tutorial in the Learning Center here on working with OCGs (option content groups = layers) which is the cover sheet part, and you can download a free trial of my company's Acrobat plug-in "AcroDialogs" to try out creating a custom dialog with your message and text box. But no step-by-step that I know of- something like that would be a good addition for pdfscripting.com.

Hope this helps,

Dimitri
WindJack Solutions, Inc
www.pdfscripting.com
www.windjack.com
Hi Dimitri,

Thanks for your reply.

I downloaded AcroDialogs and also created a dialog with my message and edit box. I tested it and it worked fine. How do I use this for protecting a file A? Like, set a password, so that when file A is opened, this dialog box is shown, when user enters right password, he is allowed to view the document else not.

I mean can this be done with the trial version or do I have to get the full version of Acrodialog which would do what I want?

Thanks for your advice and time.