0

I am using AddImageHtml function of ABCPDF Library for generating the pages with HTML content. PDF generated text in anchor colour with underline but when I hover on it there is no link functionality. I have a table of content along with headings in each page, whenever click on any of index content page should go to that page.

Added the following line immediate after create a doc object.

theDoc.HtmlOptions.AddLinks = true;

Added the table of content in StringBuilder and bind that StringBuilder object in AddImageHtml function like below

StringBuilder sb = new StringBuilder();
sb.Append('<tr><td><a href='#About'>About</a></td><td> 1</td></tr>');

theDoc.AddImageHtml(@"<table width='100%'>"+sb.ToString()+"</table>");

In Another Page,

theDoc.AddImageHtml("<a name='#About'>About</a>");
nuthanmurari
  • 49
  • 1
  • 11
  • Each time you call AddImageHTML it is adding the HTML individually. It doesn't remember the state of the page from one call to the next so there's no way for it to link the link to the anchor.. If you create an intermediate html file then you could use AddImageUrl to add HTML in one go in which case the link would work. What version of ABCpdf are you using? – Peter G May 28 '19 at 16:49
  • Thanks, @PGTips for your response and I am using abcpdf.net 11 – nuthanmurari May 30 '19 at 09:12
  • @PGTips - Tried passing HTML as a string to AddImageUrl but this function is expecting as URL, not an HTML File. – nuthanmurari May 30 '19 at 13:47
  • If you have a valid license, even the trial version, you can get support from: https://www.websupergoo.com/support.aspx – Peter G May 31 '19 at 10:04

0 Answers0