Hello
I am using aspose.PDF for Python via .NET and i want to replace a desired text from a pdf with a new one, my code is working but when i give the text “a” it changes only the lowercase a in the pdf.
I tried using the (?i) but it doesn’t work, what can i do ?
Here is where the text is given as an input
txtAbsorber = pdf.text.TextFragmentAbsorber(“a”)
@aggemero
In such case, you need to use Regular Expression and in order to get the regex working properly, you need to specify the TextSearchOptions like below:
textFragmentAbsorber.TextSearchOptions = new TextSearchOptions(true);
Please let us know if that helps.
Yes thank you it worked i used this in python:
search_options = pdf.text.TextSearchOptions(True)
txtAbsorber.text_search_options = search_options
@aggemero
It is nice to know that you have been able to resolve the issue. Please keep using our API and feel free to create a new topic in case you need further assistance.