I want to add text to my PDF which contains URLs, this works usually in PDF files because the URL will be interpreted by Adobe Reader as a link:
"Please follow this link http://www.google.com and click on xyx."
But as soon as I store the PDF to HTML, the URL will not be interpreted as a link from the browser because no href is set:
- Code: Select all
doc.SaveToFile(file.html, FileFormat.HTML)
Result: -> Please follow this link http://www.google.com and click on xyz.
So I tried to add a PdfTextWeblink but unfortunately this works also only in PDF and not when stored to HTML:
- Code: Select all
PdfTextWebLink link1 = new PdfTextWebLink();
link1.Text = "www.google.com";
link1.Url = "www.google.com";
link1.Font = fontFamily;
link1.Brush = PdfBrushes.DarkSeaGreen;
link1.DrawTextWebLink(page.Canvas, new PointF(10, 40));
Result: -> www.google.com
So my question is, how can I add text including some URLs, stored as HTML which is getting recognized by the browser.
regards
Christan