Annotation of type AnnotationComment is not visible

Discussions about annotation support.
Post Reply
jnpt
Posts: 1
Joined: Wed Nov 13, 2019 1:29 pm

Annotation of type AnnotationComment is not visible

Post by jnpt » Wed Nov 13, 2019 1:57 pm

Hi,

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);
I am using the latest version 14.1.0.42 of GdPicture .NET.

Perhaps I misunderstand the using of this type of annotation?

Best regards
jnpt

Hugo
Posts: 227
Joined: Tue Dec 18, 2018 10:09 am

Re: Annotation of type AnnotationComment is not visible

Post by Hugo » Tue Nov 19, 2019 4:29 pm

Hi there,

Usually when annotations are not visible it is due to not burning it. This step is important and should not be skipped. Please make sure you are burning the annotation so it is successfully displayed in your document.
The method can be found here: https://www.gdpicture.com/guides/gdpicture/GdP ... lean).html

Regards,

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest