Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Adding of annotations

More
IP: 192.168.0.71 11 years 6 months ago #6646 by petr.sklenicka
Hello,
I have a little issue with adding of annotations to a page. The issue is, that a code, which I use, is working, however in case, that a PDF-document view is increased in its size, the code stops to work. When I decrease the size of the view, everything works fine again.
For adding the annotation I use this code:

page.AddAnnotText(new float[] { x, y });
page = vPage.GetPage();
int annotCount = page.GetAnnotCount();
Annotation textAnnot = page.GetAnnot(annotCount - 1);
textAnnot.SetPopupText(noteText);
textAnnot.SetFillColor(Page.highlightColor);
textAnnot.SetPopupSubject(String.valueOf(timestamp));

page is an object of class page acquired by a method vGetPage (currentNbrofPage).

Do you know where could be the problem? Many thanks.
More
IP: 192.168.0.71 11 years 6 months ago #6651 by radaee
Replied by radaee on topic Adding of annotations
increase View size cause vLayout, which re-layout all pages in async way.
in this case, page object did not avaible.

decrease View size mostly not cause vLayout.
More
IP: 192.168.0.71 11 years 6 months ago #6657 by petr.sklenicka
Thanks for your reply. Is there any way how to add annotation when the View is increased?
More
IP: 192.168.0.71 11 years 6 months ago #6659 by radaee
Replied by radaee on topic Adding of annotations
wait untill page rendered.
in PDFReader.OnPDFPageDisplayed()
check vPage.IsFinished();
Time to create page: 0.419 seconds
Powered by Kunena Forum