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.

Wed Mar 13, 2019 8:14 am

Hello Sir,

I am using "SpirePDF HotFix5.1.0" version in my C# project. I have searched text in a pdf document. But the search is latter case sensitive, I want to know is there any option of searching text with letter case insensitive , then how I impliment my code. Please let me know.

Thank you,
Kind regards,
Nilarya Talukdar

nilarya
 
Posts: 20
Joined: Mon Mar 19, 2018 7:23 am

Wed Mar 13, 2019 8:38 am

Hi,

Thanks for your inquiry.
Our Spire.PDF provides the property to ignore letter case when searching. Please refer to the following code. If there is any question, just feel free to write back.
Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile("sample.pdf");
PdfTextFind[] result = null;
foreach (PdfPageBase page in doc.Pages)
{
    //Sets the "ignoreCase" Boolean to be true
    result = page.FindText("text",false,true).Finds;
}
doc.SaveToFile("result.pdf", FileFormat.PDF);

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Wed Mar 13, 2019 10:51 am

hello,

yes I got it.

Thank you

nilarya
 
Posts: 20
Joined: Mon Mar 19, 2018 7:23 am

Thu Mar 14, 2019 1:38 am

Hi,

Thanks for your feedback.
If you need assistance in the future, please do not hesitate to contact us.
Wish you a nice day!

Yours sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.PDF