tamamaxx.blogg.se

Highlight text in a pdf
Highlight text in a pdf












highlight text in a pdf

(If you wish to highlight the results, you can also use the HighlightResult method - as described above.) The code example below shows how to use the PdfDocumentProcessor.FindText method to search text. Processor.AddTextMarkupAnnotation(result.PageNumber, result.Rectangles(i), PdfTextMarkupAnnotationType.Highlight)Īnnotation.Color = New PdfRGBColor(0.2, 0.6, 0) Public Shared Sub HighlightResult(ByVal processor As PdfDocumentProcessor, ByVal result As PdfTextSearchResults)ĭim annotation As PdfTextMarkupAnnotationData = Processor.AddTextMarkupAnnotation(result.PageNumber, result.Rectangles, PdfTextMarkupAnnotationType.Highlight) Īnnotation.Color = new PdfRGBColor(0.2, 0.6, 0) Public static void HighlightResult(PdfDocumentProcessor processor, PdfTextSearchResults result) The PdfAnnotationData.Color property specifies the annotation color. Use the PdfTextSearchResults.Rectangles property to access the document areas that contain search text. Graphics.AddToPageForeground(result.Page, 72, 72)Ĭall the PdfDocumentProcessor.AddTextMarkupAnnotation method to add an annotation to the search results. Public Shared Sub HighlightResult(ByVal graphics As PdfGraphics, ByVal result As PdfTextSearchResults, ByVal brush As SolidBrush)įor i As Integer = 0 To - 1ĭim rect As New RectangleF(New PointF(CSng(result.Rectangles(i).Left), CSng() - CSng(result.Rectangles(i).Top)), New SizeF(CSng(result.Rectangles(i).Width), CSng(result.Rectangles(i).Height))) Graphics.AddToPageForeground(result.Page, 72, 72)

highlight text in a pdf

RectangleF rect = new RectangleF(new PointF((float), (float) - (float)),

highlight text in a pdf

Public static void HighlightResult(PdfGraphics graphics, PdfTextSearchResults result, SolidBrush brush)įor (int i = 0 i < i++)














Highlight text in a pdf