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.
Unfortunately, activation email could not send to your email. Please try again.

Links not showing even when EnableHyperlinks = True

Thread ID:

Created:

Updated:

Platform:

Replies:

100076 Jun 30,2011 04:06 PM Jul 1,2011 01:25 AM ASP.NET Web Forms (Classic) 1
loading
Tags: PDF
Daniel Harmon
Asked On June 30, 2011 04:06 PM

I am outputting a pdf from an html string. The only string I am passing is a link Go to page

It makes it look like a link on the outputted pdf but it is not clickable.

Here is some code:

Public Class PdfUtils
Public Sub New()

End Sub

Private Globalhtml As String
Private GLobalimage As Image


Public Sub ConvertHtmlStringToPDF(html As String, ByRef page As PdfPage)
Globalhtml = html
Dim t As Thread = New Thread(New ThreadStart(AddressOf ConvertFromString))
t.SetApartmentState(ApartmentState.STA)
t.Start()
t.Join()
Dim metafile As PdfMetafile = New PdfMetafile(GLobalimage)

metafile.Quality = 100

Dim format As New PdfMetafileLayoutFormat
format.Break = PdfLayoutBreakType.FitPage
format.Layout = PdfLayoutType.Paginate
format.SplitTextLines = False


metafile.Draw(page, New PointF(0, 0), format)
End Sub


Private Sub ConvertFromString()
Dim html As New HtmlConverter
html.EnableHyperlinks = True
GLobalimage = html.FromString(Globalhtml, ImageType.Metafile, 900, -1, AspectRatio.KeepWidth)

End Sub


Suresh M [Syncfusion]
Replied On July 1, 2011 01:25 AM


Hi Daniel,

Thank you for your interest on Syncfusion products.

Please use the HtmlToPdfResult.Render method to get the HTMLConverter options such as Hyperlinks, PageBreaks instead of drawing metafiles in the PdfPage. Please refer to the sample available in the link below.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=HtmlToPdf658253704.zip

Please let us know if you have any queries.

Regards,
Suresh M



CONFIRMATION

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.

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.

;