Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable Shortcut Keys in PDF for Print/Copy

 
Rohit Kedia
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi ,

I am working on a PDF which is stored in Oracle Database in BLOB column.
When I am retreiveing the Data as a Byte Array from Database I am converting the Byte Array to Byte Array OutPut Stream and Flushing it to show a PDF in a New Window.

Now I want to add restrictions to the PDF that it cannot be Printed/Copied/Save to a Desktop, I was able to hide the Toolbars from the PDF but the Short-Cut Keys are still working.
Please suggest what can I do to stop this, I am working in Java 1.4.

Apology if it is not posted in the Correct Forum.
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A question about working with a PDF document... no, your suspicion is correct, that's nothing to do with servlets. Let's find a better home for it.
 
Sarah Wang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have completely the same question like yours, but I still couldn't find a way to resolve it. Here is the related artice link I searched in this site for your reference - it generates a encrypted pdf in the local drive and it works! But in my case, I have to make the pdf output in a popup browser instead of a real pdf in the local drive. When I applied to my code, what I got was an empty page. You can try that and maybe you can figure it out. And if you do, please share with me. Thanks.

the related artice link
http://www.coderanch.com/t/63399/open-source/generate-secure-restricted-pdf-IText

the API and Jar you will need as follows.
API of iText (javadoc format):
http://api.itextpdf.com/

Jar:
http://bouncycastle.org/latest_releases.html

sample code
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic