We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Hyperlink on PDF File

Thread ID:





91398 Nov 16,2009 07:10 PM UTC Oct 1,2013 04:00 AM UTC ASP.NET Web Forms (Classic) 5
Tags: PDF
Chaouki Zaouia
Asked On November 16, 2009 07:10 PM UTC

How to creat a Hyperlink on a pdf file

Divya G [Syncfusion]
Replied On November 17, 2009 10:20 AM UTC

PdfDocument document = new PdfDocument();
PdfPage page = document.Pages.Add();
PdfGraphics g = page.Graphics;
string html = "http://www.syncfusion.com";
PdfFont font = new PdfStandardFont
(PdfFontFamily.TimesRoman, 2);
PdfHTMLTextElement richTextElement = new
PdfHTMLTextElement(html, font,
richTextElement.Draw(g, new RectangleF(150, 70, 160, 50));

Chaouki Zaouia
Replied On November 18, 2009 01:36 PM UTC

I am using a vb.net, I need to greate a hyperlink to refere on an other page in tha same document (same as Links on adobe). how to?

Administrator [Syncfusion]
Replied On November 23, 2009 10:06 AM UTC

Hi Chaouki,

We can achieve the link within a document using "PdfDocumentLinkAnnotation".

Please do find the sample from the below specified location and let me know if this helps.



Juri Parrinello
Replied On September 20, 2013 10:24 AM UTC

Hi there,

I am aware that this is an old post but i tried to download the example using the link provided and i received an error because the resource is no longer there.

I am trying to embed a mailto link in my pdf document, the link has the following format:
    '<a rel='nofollow' href="mailto:juri.parrinello@.kpmg.co.uk?Subject=EmailSubject&Body=EmailBody">Add comments</a>'  

To create the PDF document, I use the following code:
            Dim pdfDoc As New PdfDocument
            Dim MyPage As PdfPage = pdfDoc.Pages.Add()
            MyPage.Section.PageSettings.Margins.Top = 10
            MyPage.Section.PageSettings.Margins.Left = 20

            Dim converter As New HtmlConverter
            converter.EnableHyperlinks = True

            converter.AutoDetectPageBreak = True
            Dim result As Image = converter.FromString(htmlData, ImageType.Metafile, 650)
            Dim pdfImage As PdfImage = pdfImage.FromImage(result)
            Dim format As PdfMetafileLayoutFormat = New PdfMetafileLayoutFormat()
            format.Break = PdfLayoutBreakType.FitPage
            format.Layout = PdfLayoutType.Paginate
            format.SplitTextLines = False
            format.SplitImages = False
            pdfImage.Draw(MyPage, PointF.Empty, format)

Yet, when the pdf document is created, the link looks like a proper link Add comments but clicking it does produce the expected result (opening a new mail) - it looks like i am clicking a plain text.

Would someone be able to assist me with my query?

Kind Regards
Juri Parrinello

Praveenkumar H [Syncfusion]
Replied On October 1, 2013 04:00 AM UTC

Hi Juri,

Thank you for using syncfusion products,

We are not able to reproduce the mentioned issue.
Hence we have attached the generated document.
Please provide us more details about the issue.

Please let us know if you need further assistance,

With Regards,



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon