Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Jun 14, 2016 2:53 pm

Good Morning.
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!!!

solucionare
 
Posts: 1
Joined: Mon Jun 13, 2016 6:48 pm

Wed Jun 15, 2016 2:10 am

Hi,

Thank you for your feedback and your sharing code.
Could you please provide us this pdf document can replicate your issue to do an investigation? Thank you for the assistance.

Sincerely,
Caroline
E-iceblue support team
User avatar

caroline.zhang
 
Posts: 291
Joined: Mon Mar 07, 2016 9:22 am

Return to Spire.PDF