Here is my code..a few simple lines.. --> 

try{
        PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream((prod.nomeFat.substring(0,
nomeFat.lastIndexOf("."))).concat(".pdf")));
      //writer.setEncryption(PdfWriter.STRENGTH40BITS, "d", null,
PdfWriter.AllowCopy|PdfWriter.AllowPrinting);
      try{
        Watermark watermark = new
Watermark(Image.getInstance("myImage.png"), 380, 700);
        watermark.setAnnotation(new
Annotation(0,0,0,0,"http://www.myurl.com";));
        document.add(watermark);
      }
      catch(Exception e){
        System.err.println("FNF");
        }
}


Regards


~ -----Messaggio originale-----
~ Da: Paulo Soares [mailto:[EMAIL PROTECTED]]
~ Inviato: mercoledì 8 gennaio 2003 16.26
~ A: 'Collenghi, Ruggero'; '[EMAIL PROTECTED]'
~ Oggetto: RE: [iText-questions] Watermark and annotations
~ 
~ 
~ That error happens if you placed an annotation for, say, page 10 but your
~ document only has 9 pages. A look at a short snippet of your code would be
~ helpful.
~ 
~ Best Regards,
~ Paulo Soares





***********************************************************************************************
The information contained in this message or any of its attachments may be 
confidential and is intended for the exclusive use of the addressee(s). Any 
disclosure, reproduction, distribution or other dissemination or use of this 
communication is strictly prohibited without the express permission of the sender. The 
views expressed in this email are those of the individual and not necessarily those of 
Sony or Sony affiliated companies. Sony email is for business use only. 

This email and any response may be monitored by Sony United Kingdom Limited.
(6)
***********************************************************************************************



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to