itextsharp - Change PDF's hyperlink display text -


using itextsharp how can modify display text of hyperlink in pdf document. can change annotation link, target change displaying text of hyperlink not actual web link. possible? don't want add new anchor, want modify existing anchor different text, not changing existing web link.

thanks

use this,

using (filestream msreport = new filestream(server.mappath("~") + "/app_data/" + datetime.now.ticks + ".pdf", filemode.create)) {      document doc = new document(pagesize.letter, 10, 10, 20, 10);      pdfwriter pdfwriter = pdfwriter.getinstance(doc, msreport);      doc.open();      font link = fontfactory.getfont("arial", 12, font.underline, basecolor.blue);      anchor anchor = new anchor("google", link);      anchor.reference = "https://www.google.co.in";      doc.add(anchor);      doc.close(); } 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -