I am to buy spire.PDF, however I need to use the method 'ApplyHighLight' and it is not creating the PDF with the highlighted words.
Follow my source code:
- Code: Select all
private void btnExecutar_Click(object sender, EventArgs e)
{
string arquivo = @"C:\PDF\TESTE.pdf";
PdfDocument doc = new PdfDocument(arquivo);
PdfTextFind[] result = null;
foreach (PdfPageBase page in doc.Pages)
{
result = page.FindText(textBox1.Text).Finds;
for (int i = 0; i < result.Count(); i++)
{
result[i].ApplyHighLight(Color.Blue);
}
}
//Save pdf file.
doc.SaveToFile(@"C:\PDF\resultHighLight.pdf", Spire.Pdf.FileFormat.PDF);
doc.Close();
System.Diagnostics.Process.Start(@"C:\PDF\resultHighLight.pdf");
}
already thanking help!!!