We have a demo demonstrating a similar scenario using RadPdfViewer in combination with RadPdfProcessing
. RadPdfViewer is used to visualize a PDF file and when the user clicks on it, the page index and location are obtained through the GetLocationFromViewPoint() method. The document is modified using the API of RadPdfProcessing, exported and opened. Please, find the sample project in the attachments.
However, if you prefer to stick to the approach with selection, you could check our help article
that describes how you could create a TextSelection. After you have already selected the text, you could use the GetSelectionGeometry() method of the Selection in order to check the start position of the geometry that describes the selection.
PathGeometry geometry =
Point startPoint = geometry.Figures.First().StartPoint;
Hope this helps.
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer
and share your thoughts.