Var findsDrive = doc.FindText(new FindTextParams("drive", true, false), OutputRange.All) Use the FindText method to search text for drive, using case-insensitive, whole word match Using (var fs = new FileStream(Path.Combine("PDF Test.pdf"),
WORD SEARCH IN PDF DOCUMENT PDF
Highlight each item found by using the System.Drawing Graphics class and the bounds of the found text.įor example, use the following code to find the word "drive" in a PDF and then highlight the found word.Ĭ#: // Create an object of GcPdfDocument class. Use GcPDF’s FindText method to perform a text search in a PDF. Find and Highlight Text in a PDF Document Find Text in a Specific Range of PDF Pagesĭownload Now! 1.Find and Highlight Text in a PDF Document.This blog will cover the steps required to conduct these text searches. GrapeCity’s Documents for PDF (GcPDF) our PDF API library, enables developers to conduct different types of text searches to find, highlight, or redact text within a PDF document.
Using GrapeCity's Documents for PDF you can accomplish all these text search and redact text scenarios from a PDF.
You may even want to programmatically search and hide certain confidential data. When working with several PDF's it becomes vital to use a PDF API that can programmatically find the text based on different scenarios, such as searching on a particular page or range of pages or finding text with specified search parameters. When sharing PDFs there could be several documents that need to be searched to find some text. This allows companies to share data with ease and peace of mind. PDFs have become an exceedingly popular way to share and view data since the content within them is more difficult to modify.