Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Issue Converting HTML to PDF

$
0
0

Hi,

I am not able to convert the attached HTML to PDF using Aspose.PDF. The converted PDF file is not retaining any formatting specified in the HTML tag.

To rule out issues with a malformed HTML I used the same file in several other online conversion tool and the file converted correctly to PDF without any formatting issues.

Here is the code(using Aspose.PDF version 7.1):

Dim strHTML AsString = File.ReadAllText("C:\testingRPT.html")

Dim oPDF As Pdf.Generator.Pdf = New Pdf.Generator.Pdf

Dim license As Aspose.Pdf.License = New Aspose.Pdf.License

license.SetLicense(

"Aspose.Total.lic")

oPDF.BindHTML(strHTML)

oPDF.IsLandscape =

True

oPDF.Save(

"C:\ddxxhh.pdf")

Any help is truely appreciated.

Sid

Note: The file extension is renamed from .html to .txt to allow for uploading to the forum.


Viewing all articles
Browse latest Browse all 3131

Trending Articles