Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Document Security with PDFs
Last Post 12/10/2010 2:17 PM by Peter Donker. 2 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Throttlenet
New Member
New Member
Posts:2


--
12/03/2010 12:55 AM
Hello,

We are utilizing the Document Exchange Manager in our website which needs to securely lock down all documents uploaded (PDFs). We have set all users roles on the documents to prevent certain users from seeing certain document folders. However, when we open a PDF file in Internet Explorer (which is the only browser allowed for use with this site), the Save As option appears in the File menu in the main toolbar and the Save As Copy button on adobe reader. We would like to disable these options so the users cannot download a copy of the file to their machine and email that out to other members of their organization.

We reviewed the DesktopModules/Controls/View/File.Adobe.Acrobat.ascx control and noticed it uses a javascript object named "PDFObject". We first attempted to remove toolbars, menubars, and the status bar on the browser in the URL section of PDFObject. Below is an example of the code I am talking about:

<script type="text/javascript"> <br /> var success = new PDFObject({ url: "<%=DownloadUrl%>", width: "<%=PreferredWidth%>px", height: "<%=PreferredHeight%>px" }).embed('PDFViewerDIV'); <br /> </script> <br /> <br /> We were not able to get the results we were looking for in modifying this file and looked through the module code to locate where "PDFObject" was being created. The file we found it in is DesktopModules/Bring2Mind/DMX/js/ViewCollection.js. We attempted to set attributes to the variable "objEl" for hiding the browser toolbars, menubar, and statusbar. We noticed that the height and width of the browser window were being set in this section as well (towards the bottom of the ViewCollection.js file). This is a sample of what we added to the javascript code: <br /> <br /> objEl.setAttribute("toolbar","no"); <br /> <br /> This did not hide the toolbars or any other bars in the browser either. We have searched through the javascript code and are unsure if the window.open method to open the PDF document into a new browser window is coming from the "ViewCollection.js" file, or if that is set in the compiled code. <br /> <br /> Is there a way we can modify the ViewCollection.js file to remove the browser toolbars when opening a document into a new window? Can the window.open method within the ViewCollection.js file take in attributes for toolbars, menubar, and statusbar? Is the url creation for the PDF document popup window handled in the compiled back end code? Does the url creation for the PDF document viewer popup window occur before the ViewCollection.js module is accessed?
Throttlenet
New Member
New Member
Posts:2


--
12/03/2010 1:15 AM
The version of DNN that we are using is v05.05.01 and the site uses a SQL Server 2008 backend database. The document exchange module we are using is DMX Pro version 5.3.1.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
12/10/2010 2:17 PM
Hi Matt,

First a quick note about viewing vs downloading. The save as button is a function in Acrobat itself and not in DMX. The document itself is already on the client computer when it is being viewed. Even if you were able to prevent saving it makes no difference as the document is in the user's temporary internet files. And even if you were to prevent that it still passes over the wire for a user to be able to see it in the browser. It is trivial to get a PDF document that I can view inline unless the document is transformed into another format.

About your desire to change ViewCollection.js: I cannot help you with your quest. I have never had this request before. Sometimes people ask to be able to disable downloading but I always explain that if you view something in your client browser, it is already downloaded.

Peter Donker
You are not authorized to post a reply.