|
|
I don't quite understand there you have a problems. Are you use PdfToolStripSearch or implements the search routine yourself via PdfSearch Class? If I understand you correctly, in order to determine whether the text on the page is visible, you can get the bounding boxes of each found characters in the page's coordinates. Code:
var textInfo = Document.Pages[pageIndex].Text.GetTextInfo(e.CharIndex, e.CharsCount);
Next you can convert them to the control's coordinate system. Code:
var pt1 = pdfViewer1.PageToDevice(rc.left, rc.top, pageIndex);
var pt2 = pdfViewer1.PageToDevice(rc.right, rc.bottom, pageIndex);
And then compare these coordinates with PdfViewer's ClientArea.
|
|
|
Hi,
I used both controls, the WPF and the WinForms control (WinForms preferred). My problem is the following: First, the user zooms into a page inside a PDF document. Then, he'd like to search for a specific text.
While both functions (Zoom and Highlighting) works perfectly when the whole page is shown, there is a problem to get Highlighted text into the visible area of a zoomed page. Is there an explanation how to accomplish that?
Currently, I have two dlls referenced in my project. PataGames.Pdf.Winforms and PataGames.Pdf.
Many thanks for your help
|
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close