Jump to content

Controlled access to PDF's using Web Viewer


djlane

This topic is 5749 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Well this started as a question, but now it’s a tip, with a question (VB Script related) at the end.

The goal is to display a PDF document in the web viewer, but use FM to control what the users can do. I don’t want them to be able to print or save as etc. I want those actions to be controlled by script and logged.

You cannot prevent a user from saving a copy of the document if you allow them to open it with Adobe Reader.

I tried placing a button or a field over the web viewer, with access only to the scroll bar, but for some reason the Web Viewer always places itself on top of the button. So the user can still right click it and print, save etc. The Manual says that the user cannot interact with the page content if the viewer is set as a button, but this does not seem to be the case when viewing a PDF.

If I untick “Allow interaction with the Web Viewer”, then that kills the toolbar, but then the user cannot use the scroll bar to see multiple pages. No good.

I found something on the Adobe Knowledgebase that turns off the Toolbar ;) http://support.adobe.com/devsup/devsup.nsf/docs/51866.htm All I have to do is add “#toolbar=0” to the Web viewer URL, and the toolbar is gone. It does remove the toolbar but does not prevent right clicking and therefore printing. And a smart user can get around the Java script and reactivate the toolbar. Still no good.

To prevent printing, I could use the security feature in Acrobat and disallow printing. But that means I can’t dynamically control access to the document using FM – each document has to be created with or without the ability to print. No good.

So, I figured I will go back to unticking “allow interaction with the Web Viewer”, and then pass a parameter to the viewer which tells it which page to open. Because the user will not have access to the scrollbar (interaction with the Web Viewer is unticked), I can just use buttons on the layout to go to whatever page I want. This is where I found out about those parameters : http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf

The syntax is file://localhost/C:/Documents/PDF0004.pdf#page=1

To remove the PDF scrollbar so the user does not get confused about seeing a scrollbar they cannot use :

file://localhost/C:/Documents/PDF0004.pdf#page=1&scrollbar=0

I have up and down arrow buttons which change the page number, and then run a script with the Set Web Viewer command, with the new URL (eg. file://localhost/C:/Documents/PDF0004.pdf#page=2). Also, to get the URL to reload with the correct page, the script needs to go to a different layout and then return to the layout with the Web Viewer. I can’t seem to get it to change pages without doing this.

This is a nice secure way of allowing users to view PDF documents. Its simply not possible to prevent someone from saving a copy of a PDF document if you use Adobe Reader (unless you password protect the document). The users of course need access to the folder containing the documents, but they don’t need to know where that folder is.

The question is how do I print the PDF without allowing the user to open Adobe Reader. I think I need to run a script which creates & executes a VB script to print the file. Can anyone tell me how to do that ? I tried using a script with send event / print document step, but it always opens acrobat reader.

Link to comment
Share on other sites

This topic is 5749 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.