Put Annotation and Show on Code

Discussions about annotation support.
Post Reply
Diego
Posts: 29
Joined: Thu Jan 19, 2012 9:09 pm

Put Annotation and Show on Code

Post by Diego » Thu Sep 20, 2012 6:39 pm

Hi,

I Want add annotation in pdf file and show in runtime. how do I do that ?

fallows the code:

Code: Select all

oGdPicturePDF := CreateComObject(CLASS_GdPicturePDF) as _GdPicturePDF;

  If oGdPicturePDF.LoadFromFile(WPathImagem, false) = GdPictureStatus_OK Then
  Begin
     oAnnotationManager := CreateComObject(CLASS_AnnotationManager) as _AnnotationManager;
     If oAnnotationManager.InitFromGdPicturePDF(oGdPicturePDF) = GdPictureStatus_OK Then
     Begin
       //Seleciono a primeira página
       oGdPicturePDF.SelectPage(1);

       //Crio o Texto
       WTextoCarimbo := 'SCANNER ';
       WTextoCarimbo := WTextoCarimbo + IntToStr(DayOf(Date))+'/'+IntToStr(MonthOf(Date))+'/'+IntToStr(YearOf(Date));
       WTextoCarimbo := WTextoCarimbo + ' as ' + IntToStr(HourOf(Now)) + ':' + IntToStr(MinuteOf(Now)) + ':' + IntToStr(SecondOf(Now));

       annot := oAnnotationManager.AddStickyNoteAnnot(6.50,10.80,1.30,0.70,WTextoCarimbo);
       oAnnotationManager.SetAnnotationPropertyValue(0, 'FillColor', oGdPicturePDF.SetFillColor(TransparentColorValue));

       oAnnotationManager.BurnAnnotationsToPage(True);

       oAnnotationManager.SaveAnnotationsToPage();

       GdViewer1.ReloadAnnotations;

Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: Put Annotation and Show on Code

Post by Gabriela » Sun May 19, 2019 9:00 pm

Hi,

Please find fully working sample applications in the installation package:
Sample Guide Overview

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest