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.

Thu Jul 09, 2020 11:57 am

Hi There, I am a corporate developer in the US and I am having a problem when trying find and highlight text on a pdf file. It takes a pdf file and does the search ok but when it writes the new file the text is missing and the document is messed up. I have tried this in both the full version and the free version with the same results. I think this software has promise but if it doesn't work I can't use it. Looking forward to your reply. Thanks -Frank Silano

Here is my code (C#) that I have taken from the example code on your site.
PdfDocument pdf = new PdfDocument(tempDocFile);

PdfTextFind[] result = null;
foreach (PdfPageBase page in pdf.Pages)
{
//result = page.FindText("Youth").Finds;
result = page.FindText(searchString, TextFindParameter.IgnoreCase).Finds;
foreach (PdfTextFind find in result)
{
find.ApplyHighLight();
}
}
pdf.SaveToFile(theDst);

franknwtc
 
Posts: 3
Joined: Thu Jul 09, 2020 11:51 am

Fri Jul 10, 2020 2:07 am

Hello,

Thanks for your inquiry.
To help us investigate your issue more accurately, please provide your input file along with your output file. You could upload them here or send them to us (support@e-iceblue.com) via email.
Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Fri Jul 10, 2020 11:34 am

Due to the nature of the information in the documents I can't do that. I will try to find something benign that I can send you.
Thanks,
Frank

franknwtc
 
Posts: 3
Joined: Thu Jul 09, 2020 11:51 am

Mon Jul 13, 2020 1:28 am

Hello,

Thanks for your response.
You could remove the security data of your PDF file as long as the modified file could reproduce your issue. And we promise to keep your document confidential and will not use it for any other purpose. Looking forward to your file for further investigation.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.PDF