This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Other Languages and the fly likes Disable Shortcut Keys in PDF for Print/Copy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "Disable Shortcut Keys in PDF for Print/Copy" Watch "Disable Shortcut Keys in PDF for Print/Copy" New topic
Author

Disable Shortcut Keys in PDF for Print/Copy

Rohit Kedia
Ranch Hand

Joined: Apr 24, 2010
Posts: 79

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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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

Joined: Dec 23, 2010
Posts: 2
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disable Shortcut Keys in PDF for Print/Copy