[PDFNet] PDF Stamping and working with annotations.

Q: I need some help on annotation.

1. How to put water mark diagonally. Right now we able to insert it
horizontally

2. If the page resolution is high/low then water mark is not inserted
properly.
  i. If DPI is higher it shows smaller text of watermark
  ii. If DPI is low the water mark text goes out of page.

3. How to clear all the annotation such as circle, line, ellipse,
arrow and signature insertion at one time
Signature is placed using the Widgets form field . And others are used
as direct functionality of the provided by pdftron.
------------------
A: You could use ElementBuilder & ElementWriter using the approach
described in the following article:

http://groups.google.com/group/pdfnet-sdk/browse_thread/thread/d017db32b85c78e9/8f66636628202344

In the current 'unofficial' build of PDFNet (http://www.pdftron.com/
IDR49A9-B29D/PDFNet.zip) there is a new utility class called
'pdftron.PDF.Stamper' which can be used to stamp PDF pages in only a
few lines of code.

2. If the page resolution is high/low then water mark is not inserted properly.
i. If DPI is higher it shows smaller text of watermark ii. If DPI is
low the water mark text goes out of page.

It sounds that you should use points instead of pixels (e.g. use image
dimension only for aspect ratio but actual scaling dimension as a
percentage of page width/height).

3. How to "clear all" the annotation such as circle, line, ellipse ,
arrow and signature insertion at one time Signature is placed using
the Widgets form field .

You can erase all annotations using page.GetSDFObj.Erase("Annots").

Alternatively you can traverse annotations using page.GetAnnot(i) and
page.RemoveAnnot(i) - in this case you will need to do this in the
reverse order because annotations are store in an array and erasing
the annotation in forward direction may not work as expected. You
could tag annotations with creation date:

annot.Set...
annot.Set...
annot.Set...

pdftron.PDF.Date now = new pdftron.PDF.Date(); now.SetCurrentTime();
annot.SetDate(now);

to obtain the current date value use:

Date d = annot.GetDate(now);

--
You received this message because you are subscribed to the "PDFTron PDFNet SDK" group. To post to this group, send email to support@pdftron.com
To unsubscribe from this group, send email to pdfnet-sdk-unsubscribe@googlegroups.com. For more information, please visit us at http://www.pdftron.com