2 screenshots are attached, one is before replace and other after replace.
There are 2 issues highlighted in screenshots,
- Length of the hyperlink line (i.e blue line) after replacing text is same as before, it is not updating. (In the screen shot i have replaced “ICC” with “ICC replaced”)
- If there are multiple hyperlinks in a line, all the hyperlinks formats are gone even if the one hyperlink text is replaced.
Below is the code that i’m using to replace Text,
PdfContentEditor pdfContentEditor = new PdfContentEditor();
pdfContentEditor.TextReplaceOptions.ReplaceAdjustmentAction = TextReplaceOptions.ReplaceAdjustment.WholeWordsHyphenation; pdfContentEditor.TextEditOptions.ToAttemptGetUnderlineFromSource = true; // Replace text on all pages pdfContentEditor.ReplaceText(sentence, pageNo, newText);
Please do the needful and it is quite urgent.
Please let me know if you need any other details.