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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Question About PDF Viewer and Text Search

Thread ID:

Created:

Updated:

Platform:

Replies:

120142 Sep 4,2015 12:18 AM UTC Sep 4,2015 09:00 AM UTC WinForms 1
loading
Tags: PdfViewer
Alan Burkhart
Asked On September 4, 2015 12:18 AM UTC

I am building a PDF viewer application using your PDFViewerControl, using my own user interface instead of the one that's built in to the control.

At present I'm trying to figure out how to implement a text search with more features than the included search toolbar. My issues are:

  • I need to include "Match Case" and "Whole Word Only" functionality
  • Regular Expression capability would be great but can do without it
  • I need "Find All" capability

As to Find All, I would have thought the ability to use the dictionary which contains the rectangle coordinates of the words (FindText) would be something I could use by filling each rectangle with a semitransparent color. But I have not been able to get this to work. No exceptions are raised but there is no visible effect in the document. The code below jumps to the appropriate page and then "should" fill the rectangles:

Private Sub btn_LookDown_Click(sender As Object, e As EventArgs) Handles btn_LookDown.Click
Try
srchCount += 1
pdf.GoToPageAtIndex(textSearch.Keys(srchCount) + 1)

Dim g As Graphics = pdf.CreateGraphics
Dim br As New SolidBrush(Color.FromArgb(128, 255, 0, 0))
g.FillRectangles(br, textSearch(srchCount).ToArray)

Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub

Is there a way to achieve the functionality I want via the PDF namespace? I do not fully understand OCR yet (haven't had time to dig too deeply) but thought I might find an answer there. Any suggestions are appreciated.

One other item: Setting the BackColor property of the PDFViewerControl has no effect. I'd like to be able to change it so the area around the document matches the color scheme of the application.

Thanks

- - AB



Uthistran S [Syncfusion]
Replied On September 4, 2015 09:00 AM UTC

Hi Alan,
We have created three support incidents for better follow up under your account. Please log on to our support website to check for further updates,
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Regards,
Uthistran S.

CONFIRMATION

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.

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

;