I am outputting a pdf from an html string. The only string I am passing is a link
Go to pageIt 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