Can aspose take html and save it as a pdf?

I’m evaluating the trial version for out needs. I see mentioned in the features list that it can “handle” html among other things and I know it can save a document as a pdf. My question is, can you create a new aspose document, load it with html, then save it as a pdf. If this is possible, could I see some code on how to insert the html into the document?

Thanks,
Rut

Hi

Thanks for your request. Yes, of course you can do it with Aspose.Words, but you should note that Aspose.Words was originally designed to work with MS Word documents. That is why upon processing HTML some features of HTML might be lost. You can find a list of limitation upon exporting/importing to HTML here:
https://docs.aspose.com/words/net/save-in-html-xhtml-mhtml-formats/
Please, see the following code:

// Load HTML
Document doc = new Document(@"in.html");
// Save output document
doc.Save(@"out.pdf");

Also please follow this link to learn more about InsertHtml method:
https://reference.aspose.com/words/net/aspose.words/documentbuilder/inserthtml/
Hope this helps.
Best regards,