How to convert the current mouse position on the screen to the Rectangle used by the TextFragmentAbsorber

how can I convert the current mouse position on the screen to the Rectangle used by the TextFragmentAbsorber? See my code below.

Background: I use the PDFVIewer from DevExpress and when the user selects a text then it should get replaced by the new text and the Problem is that the selected text could be multiple times in the PDF therefore to change Only the selected Text I need to specify its rectangle position.

Point mouseLocationOnScreen = Mouse.GetPosition(_mainWindow);
                Aspose.Pdf.Text.TextFragmentAbsorber TextFragmentAbsorberAddress = new Aspose.Pdf.Text.TextFragmentAbsorber(textSelection);
                TextFragmentAbsorberAddress.TextSearchOptions.Rectangle = new Aspose.Pdf.Rectangle(100, 100, 200, 200);

@PatrickITech

We are gathering related information and will get back to you soon.

Can I help you somehow to analyze it faster? On Tuesday 5.12 I have a presentation where I need a solution to that.

@PatrickITech

We would like to share with you that the feature of converting the coordinates captured by mouse is not implemented in the API. This requirement can be complex because of the specifications of the PDF file format. Please note that the coordinating system in the PDF file format is implemented differently. Also, the PDF documents does not follow any fixed or constant resolution. Their rendering depends upon on which screen, device or monitor you are viewing them.

These all factors make this particular requirement more challenging. Nevertheless, we will try to investigate the feasibility of your requirements in more details. We will log an investigation ticket in our internal issue management system and share the ID with you.

@asad.ali
What coordinates are used by the TextSearchOptions.Rectangle? Where can I find more documentation regarding this? Then I try it on my own. Many thank for any input!

TextFragmentAbsorberAddress.TextSearchOptions.Rectangle = new Aspose.PDF.Rectangle(100, 100, 200, 200);

@PatrickITech

The unit of measurement in Aspose.PDF is point where 72 points = 1 inch. The coordinating system which API follows, starts from bottom-left. x=0, y=0 means the bottom-left corner of the PDF page. We hope this information will help you in understanding the coordinating system and implement your requirements accordingly.