Welcome Guest Search | Active Topics | Sign In | Register

NoLink doesn't work Options
CasUser
Posted: Wednesday, February 17, 2021 7:24:10 AM
Rank: Newbie
Groups: Member

Joined: 2/17/2021
Posts: 3
Hi.
I am trying to render a watermark as a text by calling:
HtmlToPdf.ConvertHtml(watermarkText, stream, options);

WatermarkText is a simple link - https://www.google.com/
Before the ConvertHtml call, the next options are configured:

Quote:

HtmlToPdfOptions.TriggerMode = HtmlToPdfTriggerMode.Auto;
HtmlToPdfOptions.NoLink = true;


But it seems that property NoLink doesn't work at all.
Result Pdf file link is clickable.
How to disable all links?

The used version of EO.Pdf - 19.2.91
eo_support
Posted: Wednesday, February 17, 2021 2:18:59 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

We tested the following code with the latest version and it seems to work fine:

Code: C#
HtmlToPdf.Options.NoLink = true;
HtmlToPdf.ConvertUrl("http://www.google.com", result_pdf_file);


Can you try it on your end and see if it works for you?

Thanks!
CasUser
Posted: Thursday, February 18, 2021 3:03:45 AM
Rank: Newbie
Groups: Member

Joined: 2/17/2021
Posts: 3
eo_support wrote:
Hi,

We tested the following code with the latest version and it seems to work fine:

Code: C#
HtmlToPdf.Options.NoLink = true;
HtmlToPdf.ConvertUrl("http://www.google.com", result_pdf_file);


Can you try it on your end and see if it works for you?

Thanks!


Thanks for your answer.
Your solution works fine. But I am talking about Html to Pdf conversion.
Try this code:

Code:

HtmlToPdf.Options.NoLink = true;
HtmlToPdf.ConvertHtml("<div>http://www.google.com</div>", result_pdf_file);


The link is clickable.
CasUser
Posted: Monday, February 22, 2021 3:26:21 AM
Rank: Newbie
Groups: Member

Joined: 2/17/2021
Posts: 3
Hi there.
Have you tried my code example?
eo_support
Posted: Monday, February 22, 2021 8:30:16 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

Yes. We did test your code. There is no link information in the PDF file. However many PDF Viewers are capable of automatically detect Urls in the PDF and allow you to click on it. This is similar to Visual Studio's text code editor can automatically highlight a link and allow you to click it. There is no extra information in the text file that indicates there is a link there, it's just the Visual Studio text editor is smart enough to recognize it. What you see is similar. When you set NoLink to true, it would not generate any link information in the PDF file. However a "Smart" PDF Viewer may still be able to recognize a link and allow you to click it.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.