Implementing interactive editing (resizing and drag & drop) of existing annotations.

Q: I am almost finished implementing a bunch of annotation creation
features for our PDFTron view C++ wrapper. The last thing I would like
to be able to implement is resizing/moving the existing annotation
bounding boxes.

Are there any examples of resizing and dragging/dropping existing
A: At the moment we don't have any C++ sample code showing how to move
annotations around. PDFView sample for PDFNet (C# or VB.NET - implements some
similar operations. To move an annotation on a new location simply
call annot.SetRect(box).

Probably the best way to implement annotation box dragging is to draw
the annotation box yourself (e.g. using GDI in OnPaint/OnDraw method
in the class implementing PDFView - the view refresh would be invoked
from OnMouseMove event). Once the user releases cursor you can set the
new location for the annotation using annot.SetRect(box) and then
Update() the view.

Q: I just finished implementing a bunch of annotation creation and
editing functions in our pdfview wrapper per the sample projects and
your support desk's help. However when I view my pdf in Acrobat my
annotations do not display? They are there and the hand tool in
acrobat will select them but nothing displays.
A: Annot::Create???() are utility functions used to create annotation
objects (without annotation appearance).
In order to display them you would also need to either:
  1) Provide an explicit annotation appearance (using
annot.SetAppearance() method - you may want to search for
"SetAppearance" in this forum) or
  2) Force the viewer application to auto-generate new appearance
streams every time the document is opened. For this simply add the
following line just before saving the document:
pdfdoc.GetAcroForm().PutBool("NeedAppearances", true); This approach
will save you the effort of providing explicit annotation appearance,
however it will not work with every PDF viewer (it will work with
Acrobat though).