We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Pressure,highlighter in InkAnnotation

Thread ID:





127302 Nov 8,2016 02:02 PM UTC Nov 9,2016 12:43 PM UTC UWP 1
Tags: Pdf
Andrea Del Bello
Asked On November 8, 2016 02:02 PM UTC

I have some questions regarding the Ink Annotation class:
1)I created these methods to save and load the ink annotation:
 foreach (PdfLoadedInkAnnotation note in page.Annotations.OfType<PdfLoadedInkAnnotation>())
                    List<InkPoint> inkpoints = new List<InkPoint>();
                    for (i = 0, j = 1; j <= note.InkList.Count; i = i + 2, j = j + 2)
                        inkpoints.Add(new InkPoint(new Windows.Foundation.Point(converter.ConvertToPixels(note.InkList[i] , PdfGraphicsUnit.Point), (converter.ConvertToPixels((note.InkList[j]), PdfGraphicsUnit.Point)),(float)0.5));
                        stroke = ink.CreateStrokeFromInkPoints(inkpoints, System.Numerics.Matrix3x2.Identity);
                        draw = new InkDrawingAttributes();
                        si = new Windows.Foundation.Size(note.BorderWidth, note.BorderWidth);
                        draw.Size = si;
                        clr.B = note.Color.B;
                        clr.G = note.Color.G;
                        clr.R = note.Color.R;
                        draw.Color = clr;
                    catch (Exception er)

                             PdfInkAnnotation inkAnnot = new PdfInkAnnotation(new RectangleF(0, 0, (float)pageWidth, (float)pageHeight), inkPoints);
                            inkAnnot.BorderWidth = (int)stroke.DrawingAttributes.Size.Width;
                            Windows.UI.Color clr1 = stroke.DrawingAttributes.Color;
                            inkAnnot.Color = new PdfColor(clr1.R, clr1.G, clr1.B);

my questions are:
1) How can I implement the pressure?
The class InkPoint has x and y coordinates and pressure but I can not implement it, because the method save does not have any field for pressure.
2) Instead of using new "RectangleF (0, 0, (float) pageWidth, (float) pageHeight)"  I can use a circular shape?
3) how can I implement the highlighter?
I use a InkCanvas with inktoolbar, the highlight of InkCanvas exactly is a series of points as a simple stroke, I tried to implement the highlighter through PdfTextMarkupAnnotation Class but do not think is the right solution.
Thanks so much.

Chinnu Muniyappan [Syncfusion]
Replied On November 9, 2016 12:43 PM UTC

Hi Andrea, 
Thank you for contacting Syncfusion support. 
1) How can I implement the pressure?
The class InkPoint has x and y coordinates and pressure but I can not implement it, because the method save does not have any field for pressure.
We do not have any field to set pressure to the ink annotation instead we do support to set BorderWidth of the PdfInkAnnotation to change the border width of the ink annotation, please refer the below code snippet. 
PdfInkAnnotation inkAnnot = new PdfInkAnnotation(new RectangleF(0, 0, (float)pageWidth, (float)pageHeight), inkPoints); 
//Set the ink annotation border width 
inkAnnot.BorderWidth = 1; 
2) Instead of using new "RectangleF (0, 0, (float) pageWidth, (float) pageHeight)"  I can use a circular shape? 
We do not have a support for draw the ink annotation to the circular shape, we can draw only in rectangle of the bounds, it is the default behavior. 
3) how can I implement the highlighter? 
I use a InkCanvas with inktoolbar, the highlight of InkCanvas exactly is a series of points as a simple stroke, I tried to implement the highlighter throughPdfTextMarkupAnnotation Class but do not think is the right solution.
Thanks so much.
We have created a sample for adding highlight annotations using PdfViewerControl. Please refer the below screenshot and sample for more details. 
Sample link: 
Please let us know whether this is your actual requirement or else provide more detail about your requirement, so that we will provide you a prompt solution  


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon