I am trying to programmatically create a number of PDF documents with a watermark on each page using itextsharp (a C# port of Java\'s itext).
I am able to do this
Yes, the Watermark class seems to be no more - odd. However in the process of converting to iTextSharp 5.3, I found a simple way to add a watermark to a new document.
MemoryStream mem = new MemoryStream();
Document document = new Document();
PdfWriter writer = PdfWriter.GetInstance(document, mem);
PdfContentByte cb = writer.DirectContent;
document.Open();
document.NewPage();
Image watermark = Image.GetInstance(WATERMARK_URI);
watermark.SetAbsolutePosition(80, 200);
document.Add(watermark);
BaseFont bf = BaseFont.CreateFont(FONT, BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
cb.BeginText();
...
cb.EndText();
document.Close();