Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Anshuman Chakraborty
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.




 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anshuman Chakraborty
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Is there other way I can achieve this ?
i.e. Allow user to view the content but not save it.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also had the same argument with them but, unfortunately it didn't work.

Thanks anyways for your precious time.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sucks. Maybe in the future you can choose to work for clients who do not think they can alter reality.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic