• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Disable Shortcut Keys in PDF for Print/Copy

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 27286
87
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
https://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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic