aspose file tools*
The moose likes Servlets and the fly likes Disabling PDF's Navigation bar and Tool bar using stream in servlet. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Disabling PDF Watch "Disabling PDF New topic
Author

Disabling PDF's Navigation bar and Tool bar using stream in servlet.

Anshuman Chakraborty
Greenhorn

Joined: Oct 05, 2010
Posts: 20
Hi all,

I am using below mentioned code (into Servlet) for streaming PDF file to the client .





My query is that I need to disable both Navigation bar and Toolbar of PDF on the browser so that client can't copy the file [Security Reasons.].
I have seen this done in many of the portals which I want to implement into my Application.

I also went through many posts but was not satisfied with the answer.


Can you please help me here.





Anshuman Chakraborty
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
If the client can access the PDF, then he can save it. Tinkering with the display on the client -even if it were possible, which most likely it is not- does nothing for security.


Ping & DNS - my free Android networking tools app
Anshuman Chakraborty
Greenhorn

Joined: Oct 05, 2010
Posts: 20

Is there other way I can achieve this ?
i.e. Allow user to view the content but not save it.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
Why? It's pointless. If it gets streamed to the browser, then the user can save it. The web app doesn't have control over what happens on the client.

What are you actually trying to achieve?
Anshuman Chakraborty
Greenhorn

Joined: Oct 05, 2010
Posts: 20

Business Department officials have created few pdf documents.
They want these documents to be available in such a way that other employees can read the content but can't save or forward it.


Please suggest.



Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
It's impossible, as I said already. It's nonsense to begin with - either employees are trusted, or they aren't. Furthermore -even if it could be fulfilled- what stops an employee from taking screenshots?

You will have to get this requirement changed.
Anshuman Chakraborty
Greenhorn

Joined: Oct 05, 2010
Posts: 20
I also had the same argument with them but, unfortunately it didn't work.

Thanks anyways for your precious time.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
That sucks. Maybe in the future you can choose to work for clients who do not think they can alter reality.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disabling PDF's Navigation bar and Tool bar using stream in servlet.