Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Adding of annotations 9 years 10 months ago #6646

  • petr.sklenicka
  • petr.sklenicka's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 36
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

Adding of annotations 9 years 10 months ago #6651

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
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.

Please Log in or Create an account to join the conversation.

Adding of annotations 9 years 10 months ago #6657

  • petr.sklenicka
  • petr.sklenicka's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 36
  • Thank you received: 0
Thanks for your reply. Is there any way how to add annotation when the View is increased?

Please Log in or Create an account to join the conversation.

Adding of annotations 9 years 10 months ago #6659

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
wait untill page rendered.
in PDFReader.OnPDFPageDisplayed()
check vPage.IsFinished();
The following user(s) said Thank You: sanyu erisa

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum