if I add an image annotation and then a second comment annotation related to the first image annotation to an existing PDF file, the image annotation is visible, but never the comment annotation. (Testet with Adobe Reader; in browser using the pdfjs Library; in your Annotation sample.)
The code here just contains the basic statements, I tested with many additional properties of the created annotations, but nothing makes the comment visible.
Code: Select all
AnnotationManager manager = new AnnotationManager();
manager.InitFromFile(path); // path of an existing PDF file
// imageID is a valid ID of an opened image
GdPicture14.Annotations.AnnotationEmbeddedImage annotImage = manager.AddEmbeddedImageAnnot(imageID, x, y, cx, cy);
if (annotImage != null)
{
GdPicture14.Annotations.AnnotationComment annotComment = manager.AddCommentAnnot(annotImage.Guid, annotImage.Left, annotImage.Top, (float)1.0, (float)1.0); // other sizes tested as well
if (annotComment != null)
{
annotComment.Text = " ... ";
}
}
manager.SaveAnnotationsToPage();
manager.SaveDocumentToPDF(path);
Perhaps I misunderstand the using of this type of annotation?
Best regards
jnpt