Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Jan 19, 2021 2:38 pm

Dear Support Team,
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

PrintPro
 
Posts: 55
Joined: Tue Apr 16, 2019 6:17 pm

Wed Jan 20, 2021 3:08 am

Hello Christan,

Thanks for your inquiry.

Sorry at present our Spire.PDF does not support retaining the validity of hyperlinks when converting PDF to Html. We have added it as a new feature into our upgrade list. Once it is achieved, we will let you know. Apologize for the inconvenience caused.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Tue Nov 02, 2021 3:32 pm

Hello Support Team,

any news on this topic?

Regards Christian

PrintPro
 
Posts: 55
Joined: Tue Apr 16, 2019 6:17 pm

Wed Nov 03, 2021 9:24 am

Hello

Thanks for your follow up.
I am sorry that our Spire.PDF has not yet implemented the new function you need. We would try to support it, but I am afraid we cannot support it in a short time.
Anyway, if the new feature is implemented in the future, we will let you know.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.PDF