- Posts: 962
- Thank you received: 87
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
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
For the second question make sure to rerender the page after adding the annotation, by calling PDFView.vRenderSync or PDFView.vRenderAsync
- [email protected]
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
IP: 192.168.0.71
8 years 11 months ago #12229
by [email protected]
Replied by [email protected] on topic Export / import Annotations
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.
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.
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
To refresh after adding an annotation you need also to call vDraw:
i.e. in PDFView.cs for example
Code:
if (page.AddAnnotxxx())
{
PDFAnnot annot = page.GetAnnot(page.AnnotCount - 1);
}
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