I m dynamically generating a PDF using ABCpdf which contains a table of contents that would link to other pages within the same PDF. The problem is that the path of the anchor tags in the HTML get changed to an absolute path to a temporary file.
For example, ABCpdf would render the link s href:
<a href="#elementId">Link</a>
in the PDF as: file:///C:/Users/Aaron/AppData/Local/Temp/ABCpdf/pdfCMMYPSF.htm#elementId
This is how I generate the PDF:
Doc pdf = new Doc();
pdf.HtmlOptions.AddLinks = true;
pdf.Rect.Rectangle = new System.Drawing.Rectangle(20, 80, 572, 702);
int id = pdf.AddImageHtml(pdfHTML, true, pdf.HtmlOptions.BrowserWidth, true);
while (pdf.Chainable(id))
{
pdf.Page = pdf.AddPage();
id = pdf.AddImageToChain(id);
}
pdf.HtmlOptions.LinkPages();
for (int i = 0; i < pdf.PageCount; i++)
{
pdf.PageNumber = i;
pdf.Flatten();
}
Any ideas how I can get the anchor links to render properly so clicking it will jump to another page?