Hi,
I have a pdf file which has some text like "HYPER_Google_1"(attached input.png file), I would like to replace this text with "<a href="http://www.google.com">Google</a>". However I dont want to display the anchor tag in the pdf file. My required output should be something like the attached output(expected_output file) pdf file.
Could you please help me with this requirement.
I tried with below sample code.
String key = "http://www.google.com/";
key = "\""+key+"\"";
key = "<a href="+key+">Google</a>";
pdfContentEditor.replaceText("HYPER_Google_1", key);
//save output PDF
pdfContentEditor.save("D:/Dharma/Aspose/word-hypderlink-issue/ReplaceTextOnAllPages.pdf");
createHyperlink();
System.out.println("Text replaced successfully!");
I have a pdf file which has some text like "HYPER_Google_1"(attached input.png file), I would like to replace this text with "<a href="http://www.google.com">Google</a>". However I dont want to display the anchor tag in the pdf file. My required output should be something like the attached output(expected_output file) pdf file.
Could you please help me with this requirement.
I tried with below sample code.
String key = "http://www.google.com/";
key = "\""+key+"\"";
key = "<a href="+key+">Google</a>";
pdfContentEditor.replaceText("HYPER_Google_1", key);
//save output PDF
pdfContentEditor.save("D:/Dharma/Aspose/word-hypderlink-issue/ReplaceTextOnAllPages.pdf");
createHyperlink();
System.out.println("Text replaced successfully!");