HTML to PDF Convert taking a long time or Not Response

Hi,

I have a issue when convert HTML to PDF ;

  1. I have a sample HTML for convert to PDF , with name file HTML_Success (please see attached file), when i convert to html everthing fine and success become to PDF.

  2. I also tested with sample HTML for convert to PDF, with name file HTML_Failed (please see attached file), when i convert to HTML , the process is not response / hang.

this is the sample code with VB :

Dim savelocation As String = “D:\test.PDF”
Dim DataBuffer() As Byte = Nothing

        Dim bodycontent1 As String = File.ReadAllText("D:\HTML_Failed.html")
        Dim margininfo As New Aspose.Pdf.MarginInfo
        margininfo.Left = 10
        margininfo.Bottom = 50
        margininfo.Right = 10
        margininfo.Top = 20

        Dim pdfdocument As New Document()
        Dim htmlFragment1 As New HtmlFragment(bodycontent1)

        Dim currentPage = pdfdocument.Pages.Add()
        currentPage.PageInfo.Margin = margininfo
        currentPage.Paragraphs.Add(htmlFragment1)

        pdfdocument.Save(savelocation)

        If Not ReadBinaryData(savelocation, DataBuffer) Then Throw New Exception("Gagal Convert to byte")

        Dim Output As String = Convert.ToBase64String(DataBuffer)

Please Help.

Regards

Sample HTML.zip (9.7 KB)

This topic has been moved to the related forum: HTML to PDF Convert taking a long time or Not Response - Free Support Forum - aspose.com