i'm using html to pdf convertion
the convertion works, but the html is too large and it gets cut off at the right side
This is my code :
- Code: Select all
Function HtmlToPdf(Html As String) As Stream
Dim pdf = New Spire.Pdf.PdfDocument
Dim Settings = New PdfPageSettings
Settings.Size = PdfPageSize.A4
Dim layout = New PdfHtmlLayoutFormat
layout.IsWaiting= False
layout.FitToPage = Clip.Width ' tried this - didn't help
Dim Thread = New Thread(Sub()
pdf.LoadFromHTML(Html, False, Settings, layout)
End Sub)
Thread.SetApartmentState(ApartmentState.STA)
Thread.Start()
Thread.Join()
Dim Stream = New MemoryStream
pdf.SaveToStream(Stream)
Return Stream
End Function
any ideas ?
Thank you