We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert HTML to PDF and DOC file formats

Hi,


Is it possible for us to know if there are best practice that we must follow in order for all the html to be perfectly exported to pdf and doc.

Since not all of the html tables we have is completely the same when we save it as pdf and doc.

(What my boss wants is to make sure all of the things we exported is supported in the library you have before buying the product)


Thanks

@joennika214

Thanks for your inquiry. You can convert Html file to Doc/Docx/Pdf file format by using Aspose.Words. Please see the following code snippet.

Document doc = new Document(MyDir + “in.html”); 
doc.Save(MyDir + "Html2PdfSave Out.pdf", SaveFormat.Pdf);

doc.Save(MyDir + "Html2DocSave Out.doc", SaveFormat.Doc);

Moreover, please note that Aspose.Words tries to mimic the same behavior as MS Word do. Please convert your html to Doc/Docx/Pdf by using MS Word, you will get the same output.