Highlight Text tool

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Moderator: Alex

Post Reply
Vladimir
Posts: 7
Joined: Tue Jun 08, 2010 5:52 pm

Highlight Text tool

Post by Vladimir »

Hello,

Is it possible to implement the functionality like Highlight Text tool in Adobe Acrobat by using VintaSoftImaging.NET SDK?

I mean the possibility to select some paragraphs and save this selection in pdf file.

Regards,
Vladimir.
Yuri
Posts: 64
Joined: Wed Jul 23, 2008 2:47 pm

Re: Highlight Text tool

Post by Yuri »

Hello,

Use on-page drawing opportunities with necessary color, transparence and color blending.

Here is a snippet of code which highlights selected text (put it as new button in our PDFEditorDemo):

Code: Select all

private void highlightSelectedTextToolStripMenuItem_Click(object sender,
 EventArgs e)
 {
 if (imageViewer.CurrentTool == _viewerTool)
 if (_viewerTool.SelectedRegion != null)
 {
 using (PdfGraphics graphics = PdfGraphics.FromPage(FocusedPage))
 {
 Color color = Color.FromArgb(70, 255, 255, 0);
 PdfBrush brush = new PdfBrush(color,
 GraphicsStateBlendMode.Multiply);
 TextRegionLine[] lines = _viewerTool.SelectedRegion.Lines;
 for (int i = 0; i < lines.Length; i++)
 graphics.FillPolygon(brush,
 lines[i].SelectionRegion.PolygonPoints);
 }
 imageViewer.FocusedImage.Reload(true);
 }
 }
Sincerely, Yuri
Vladimir
Posts: 7
Joined: Tue Jun 08, 2010 5:52 pm

Re: Highlight Text tool

Post by Vladimir »

Thank you very much!
Post Reply