Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Windows 8.1, 10, WindowsPhone, Windows UWP

Export / import Annotations

More
IP: 192.168.0.71 8 years 11 months ago #12223 by nermeen
Replied by nermeen on topic Export / import Annotations
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
More
IP: 192.168.0.71 8 years 11 months ago #12229 by [email protected]
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.
More
IP: 192.168.0.71 8 years 11 months ago #12242 by nermeen
Replied by nermeen on topic Export / import Annotations
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
Code:
if (page.AddAnnotxxx()) { PDFAnnot annot = page.GetAnnot(page.AnnotCount - 1); }
To refresh after adding an annotation you need also to call vDraw:
Code:
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();
Time to create page: 0.398 seconds
Powered by Kunena Forum