Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Windows 8.1, 10, WindowsPhone, Windows UWP
  • Page:
  • 1
  • 2

TOPIC:

Export / import Annotations 7 years 1 week ago #12223

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
No, but If you do not want to save, then you need to get the annotation info before closing, as by closing the document and/or page object you will lose all the modifications.

For the second question make sure to rerender the page after adding the annotation, by calling PDFView.vRenderSync or PDFView.vRenderAsync

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

Export / import Annotations 7 years 1 week ago #12229

  • rau.fernandez@abamobile.com
  • rau.fernandez@abamobile.com's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
We are getting the annotation before closing the document, but only the current page is returning the annotation.

For setting the annotation, I´m trying with this two methods, but It is not print in the pdf.

PDFPage page = m_doc.GetPage(0);
page.AddAnnotEllipse(rect, strokeWidth, color, icolor);
PDFVPage vPage = m_view.vGetPage(0);
m_view.vRenderSync(vPage);


PDFVPage vPage = m_view.vGetPage(0);
PDFPage page = vPage.GetPage();
page.AddAnnotEllipse(rect, strokeWidth, 12821, 51212);
m_view.vRenderSync(vPage);


Thanks.

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

Export / import Annotations 7 years 1 week ago #12242

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
To avoid this problem, you can get the annotation immediately after it has been added to the page.
i.e. in PDFView.cs for example
if (page.AddAnnotxxx())
 {
            PDFAnnot annot = page.GetAnnot(page.AnnotCount - 1);
}
To refresh after adding an annotation you need also to call vDraw:
PDFPage page = m_doc.GetPage(0);
PDFRect rect = new PDFRect();
rect.bottom = 488.476563F;
rect.top = 206.476563F;
rect.right = 377.80426F;
rect.left = 566.2051F;
float strokeWidth = 0.8957775F;
page.AddAnnotEllipse(rect, strokeWidth, 0xffffff00, 0x50ffff00);
PDFVPage vPage = vGetPage(0);
vRenderSync(vPage);
vDraw();

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum