Q:
We have implemented
the watermark scenario using the pdftron.PDF.Stamper class from PDFNet SDK.
PDFNet.Initialize();
using (PDFDoc doc = new PDFDoc("my.pdf"))
{
using
(Stamper s
= new Stamper(Stamper.SizeType.e_relative_scale,
0.05, 0.05) {
s.SetPosition(0,
0);
s.SetOpacity(0.2F);
s.SetRotation(315);
s.SetFont(Font.Create(doc, Font.StandardType1Font.e_courier, true));
s.SetFontColor(new ColorPt(0, 0,
1, 0)); //set color
s.SetSize(pdftron.PDF.Stamper.SizeType.e_font_size,
40, -1);
s.SetTextAlignment(pdftron.PDF.Stamper.TextAlignment.e_align_center);
s.StampText(doc,
_strWaterMarkText, new pdftron.PDF.PageSet(1, 20, pdftron.PDF.PageSet.Filter.e_all));
-> apply watermark
doc.Save(@"stamped.pdf", SDFDoc.SaveOptions.e_linearized);
-> apply watermark then save it as PDF
}
This works great but we would also like to be able to apply non-editable stamps / watermarks dynamically (without modifying PDF or XPS/XOD.
Questions:
1. can we add water mark text directly to a XOD file during run time?
2. can we add water mark Image directly to a XOD file during run time?
-------
A: