jjalink wrote:
> Hi,
> A little background:

The background is confusing, so I'll remove it.

> i found no way to list the OCGs names.

Map<String, PdfLayer> layers = stamper.getPdfLayers();
if (!layers.isEmpty()) {        
   Set<String> keys = layers.keySet();
   for (String key : keys) {
     System.out.println("Layer name: " + key);
     PdfLayer layer = layers.get(key);
     // do stuff with layer...
   }
}

> 1. Is there any way to add a watermark similar to the one added in acrobat??

You're assuming that we know how a watermark is added in Acrobat or 
using Adobe SDK. That assumption is wrong. You need to tell us what you 
want using ISO-32000-1 or the PDF reference, not by explaining how it's 
done in other tools.

> 2. How can I see if a watermark exists?

That depends on what you mean by watermark?
Seems like you assume that a watermark is always in an OCG.
You ignore the possibility of having watermark annotations,
or the possibility of adding a watermark as an XObject.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to