Rubber Stamps Annotation not saving consistently

Example requests & Code samples for GdPicture Toolkits.
Post Reply
ejbrandino
Posts: 38
Joined: Thu Sep 22, 2016 4:56 am

Rubber Stamps Annotation not saving consistently

Post by ejbrandino » Tue Oct 11, 2016 2:43 am

Hi,

Every time I apply rubber stamps annotation on my pdf page and saved the document, and then re-open it afterwards, sometimes the stamps are save(retained) on the page and sometimes it doesn't.. What seems to be the problem?

My Code:

myViewer.AddRubberStampAnnotInteractive("APPROVED" + Environment.NewLine, Color.Red, "Verdana", System.Drawing.FontStyle.Bold, Color.Red, 0.08f, 0.8f, 0);

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: Rubber Stamps Annotation not saving consistently

Post by Cedric » Wed Oct 12, 2016 2:32 pm

Annotations need to be saved to the page once added, otherwise they simply disappear. My guess is that you are not saving them properly to the page.
This is done by calling the SaveAnnotationsToPage method (which, according the documentation, is automatically called internally on page change).

ejbrandino
Posts: 38
Joined: Thu Sep 22, 2016 4:56 am

Re: Rubber Stamps Annotation not saving consistently

Post by ejbrandino » Wed Oct 12, 2016 10:35 pm

Hi Cedric,

That's what I'm currently doing but again, it's not saving. Here's my code:

GdViewer.AddRubberStampAnnotInteractive("Approved" + Environment.NewLine, Color.Red, "Verdana", System.Drawing.FontStyle.Bold, Color.Red, 0.08f, 0.8f, 0);
GdViewer.SaveAnnotationsToPage();

also on the PageChanged event;
GdViewer.SaveAnnotationsToPage();

ejbrandino
Posts: 38
Joined: Thu Sep 22, 2016 4:56 am

Re: Rubber Stamps Annotation not saving consistently

Post by ejbrandino » Wed Oct 12, 2016 10:44 pm

SaveAnnotationsToPage() method is never used in your Demo Application (Annotations)

ejbrandino
Posts: 38
Joined: Thu Sep 22, 2016 4:56 am

Re: Rubber Stamps Annotation not saving consistently

Post by ejbrandino » Wed Oct 12, 2016 10:59 pm

Never mind this one Cedric, I found a solution already. Thanks.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests