Unable to load an ink annotation on a canvas - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Windows 8.1, 10, WindowsPhone, Windows UWP
  • Page:
  • 1

TOPIC: Unable to load an ink annotation on a canvas

Unable to load an ink annotation on a canvas 3 years 3 months ago #9343

  • Pja
  • Pja's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 45
  • Thank you received: 0
I am unable to load a particular ink annotation on a canvas for further editing it.
public void StylusPopUpshow(PDFAnnot annot, PDFVPage page, PDFDoc m_doc, PDFView m_view, ScrollViewer m_scroller)
{
if (!StylusCommentPopup.IsOpen)
{
StylusCommentPopup.IsOpen = true;

rect = annot.Rect;
int h = Math.Abs((int)(annot.Rect.bottom - annot.Rect.left));
int w = Math.Abs((int)(annot.Rect.right - annot.Rect.top));

m_bmp = new PDFBmp(w,h);
bmp = new WriteableBitmap(w,h);
bmp = m_bmp.Data;
bmp.Invalidate();
pg = page.GetPage();

mat = page.CreateInvertMatrix(0,0);
pg.RenderToBmp(m_bmp, mat, true, PDF_RENDER_MODE.mode_normal);

Image img = new Image();
img.Source = bmp;

Canvas.SetLeft(img, 10);
Canvas.SetTop(img, 10);

StylusCanvas.Children.Add(img);

StylusCanvas.UpdateLayout();

}
}

This is the code. Using this code the entire page is displayed on the canvas instead of the clicked annotation.
Can you help me with this?

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

Unable to load an ink annotation on a canvas 3 years 3 months ago #9352

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
Windows SDK is lacking the PDFAnnot.RenderToBmp() method yet.
We will release an update with a lot of fixes and some missing method from Android and iOS version later next week.
The following user(s) said Thank You: Pja

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

Unable to load an ink annotation on a canvas 3 years 3 months ago #9353

  • Pja
  • Pja's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 45
  • Thank you received: 0
Thank you for your reply....
Will the next version of windows have the same updates like Android?
I need to buy the windows latest version for using in my project.
Can you please keep me updated about it?

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

Unable to load an ink annotation on a canvas 3 years 3 months ago #9354

  • Pja
  • Pja's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 45
  • Thank you received: 0
I need to implement a feature in my project where i load the ink annotation on a canvas as a pop up so that i can edit it (also change the stroke color and width)
and after editing the ink annotation add the edited annotation on the same position on pdf.
Is this possible in windows library of your later versions or in paid version?
Please update me about this since i need it urgently in my project?

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

Unable to load an ink annotation on a canvas 3 years 3 months ago #9371

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
It won't be possible to alter ink paths.
The feature isn't available at the moment.
Only an annotation render to bitmap so you would be able to put it on your own canvas.

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

  • Page:
  • 1
Powered by Kunena Forum