Get CharIndex in Pdfium in WPF

287 views Asked by At

I would like to implement annotations using the PDFium PDF library for .NET.

The first thing that I would like to be able to get is the charIndex (position/coordinate) of the selected text. I have went through the documentation and FAQs.

I would like to do something like;

var myCharIndex = PdfViewer.SelectedText.CharIdex; //code not OK, I know.
1

There are 1 answers

0
GeeMaster On

I am back to share the solution that worked for me.

I used the "SelectInfo" property which has given me EndIndex, EndPage, StartIndex, StartPage values.

Ex;

var startIndex = PdfViewer.SelectedInfo.StartIndex;

Cheers,

GeeMaster.