[C# 2010] - BurnAnnotationsToPage - not burn the last?

Discussions about document viewing.
Post Reply
Dr3w
Posts: 22
Joined: Fri Nov 09, 2012 6:22 pm

[C# 2010] - BurnAnnotationsToPage - not burn the last?

Post by Dr3w » Fri Dec 21, 2012 4:17 pm

Hi at all,
I must mark each page of my pdf multipage file with an AnnotationEmbeddedImage.
I'm using the BurnAnnotationsToPage method as the example below...

Code: Select all

                    for (int _pagenum = 0; _pagenum < this.GdImageViewer.GetAnnotationManager().PageCount; _pagenum++)
                    {       
                        this.GdImageViewer.GetAnnotationManager().SelectPage(_pagenum);
                        if (this.GdImageViewer.GetAnnotationManager().GetAnnotationCount() > 0)
                        {                            
                            this.GdImageViewer.GetAnnotationManager().BurnAnnotationsToPage(true);
                            _modified = true;
                        }
                    }
...but, always, the last AnnotationEmbeddedImage isn't 'burned'.
Someone can help?

Thank you so much!
Andrea.

Dr3w
Posts: 22
Joined: Fri Nov 09, 2012 6:22 pm

Re: [C# 2010] - BurnAnnotationsToPage - not burn the last?

Post by Dr3w » Fri Dec 21, 2012 6:13 pm

Hi at all,
solved - At first, I have to select (on my GdPictureViewer) the first page of the multipage pdf, then enumerate / call BurnAnnotationsToPage method.

Andrea.

Dr3w
Posts: 22
Joined: Fri Nov 09, 2012 6:22 pm

Re: [C# 2010] - BurnAnnotationsToPage - not burn the last?

Post by Dr3w » Thu Dec 27, 2012 11:38 am

Hi at all,
errata corrige: I have to select the first page MANUALLY (with the gd-viewer or with gd-thumbnail)! If I select the first page via GdPicturePDF.SelectPage(n) or GdViewer.DisplayPage(n)... it not works.

Suggestions?
All the best.

Andrea.

Dr3w
Posts: 22
Joined: Fri Nov 09, 2012 6:22 pm

Re: [C# 2010] - BurnAnnotationsToPage - not burn the last?

Post by Dr3w » Fri Dec 28, 2012 1:10 pm

Hi,
this works:

Code: Select all

this.GdImageViewer.DisplayFirstPage();
this.GdImageViewer.Redraw();                                       
         
for (int _pagenum = 0; _pagenum < this.GdImageViewer.GetAnnotationManager().PageCount; _pagenum++)
{                           
      this.GdImageViewer.GetAnnotationManager().SelectPage(_pagenum);
      this.GdImageViewer.ReloadAnnotations();

      if (this.GdImageViewer.GetAnnotationManager().GetAnnotationCount() > 0)
            this.GdImageViewer.GetAnnotationManager().BurnAnnotationsToPage(true);
}
All the best, and happy new year.
Andrea.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests