Does anybody know if converting from html to pdf has a problem in displaying images.. .jpeg, or gif images? The code below i use to convert my page to a pdf but the pictures does not show:
Dim sr As StringWriter = New StringWriter()
HttpContext.Current.Server.Execute("Print.aspx", sr)
Dim htmlmessage As String = sr.ToString
Dim pdfBytes As Byte() = New HtmlToPdfConverter().GeneratePdf(htmlmessage)
Dim response As HttpResponse = Me.Response
response.Clear()
response.BufferOutput = True
response.AppendCookie(New HttpCookie("fileDownloadToken", String.Format("{0}{1}", customernumber, accountnumber)))
response.AddHeader("Content-Type", "binary/octet-stream")
response.AddHeader("Content-Disposition", "inline; filename=" + String.Format("{0}{1}.pdf", customernumber, accountnumber))
response.ContentType = "application/pdf"
response.BinaryWrite(pdfBytes)
HttpContext.Current.ApplicationInstance.CompleteRequest()
Catch ex As Exception