1

I am trying to make one image unselectable, actually I want to create one watermark, as to maintain a little security the image that we are going to make watermark of it should be unselectable.

I tried to make it through several way PDFBox, iText, FOP, but they all give me same result that is all generates the document with image selectable.

If that can be possible with FOP then it will be great.

Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
Mahendra
  • 11
  • 4
  • I am not sure how you are creating a watermark, take a look here http://www.java2s.com/Code/Java/PDF-RTF/AddWatermarkImagetoanExistingPDFFile.htm – varun May 22 '13 at 12:29
  • Hi Varun tried with your solutions gave me same results. the image coming is selectable(i.e. if we click on image area the color of image gets change i mean it becomes blueish and RMB gives "Copy Image" options)..... I would attach file here but i dont know how to do it.. – Mahendra May 22 '13 at 12:38
  • I know that its not possible to have a non-selectable text,I guess its quite simmilar to images as well then. Do you have any sample where you can see a watermark and is non selectable ? – varun May 22 '13 at 12:42
  • Ya i have some documents but i dont know how to attach here... please help – Mahendra May 22 '13 at 12:45
  • 1
    try mailing them to me, my eamil is in my profile page – varun May 22 '13 at 12:46
  • I tried to find your email id but i didnt get. You can give me here.... – Mahendra May 22 '13 at 13:02
  • You need to encrypt your file using an owner password and set the permissions correctly if you don't want people to be able to select content. – Bruno Lowagie May 22 '13 at 13:09
  • But this will again add login task for people who want to see that file.... – Mahendra May 22 '13 at 13:14
  • Hi Bruno, i tried with your suggestions but still get no luck, I gave permissions like int permissions = PdfWriter.ALLOW_PRINTING; PdfEncryptor.encrypt(reader, new FileOutputStream("NewPDF.pdf"), PdfWriter.ENCRYPTION_AES_128, "a", "a", permissions); now also i see image that is selectable... – Mahendra May 23 '13 at 09:18
  • http://stackoverflow.com/questions/10338592/create-non-selectable-text-watermark-in-pdf – prem30488 Apr 04 '14 at 18:27

0 Answers0