Convert HTML to PDF file

Hi Team,

We have one requirement convert HTML file or HTML url to PDF file which should apply css designs also in pdf file.

Please let me know that can i do above conversion with aspose.words dll latest version?

Thanks

@VeriparkBAH

Thanks for your inquiry. Yes, you can achieve your requirement using Aspose.Words. Please check the following code examples.

Document doc = new Document(MyDir + "input.html");
doc.Save(MyDir + "19.1.pdf");

Document doc = new Document("https://www.google.com/");
doc.Save(MyDir + "19.1.pdf");

Thanks for the prompt response. I am able to generate PDF but CSS lay out is missing.
How can i include css file in above code

Thanks

@VeriparkBAH

Thanks for your inquiry. Please ZIP and attach your input and problematic output documents here for testing. We will investigate the issue on our side and provide you more information.