I’m using the latest version of Aspose in a .NET/MVC 4 web application to convert HTML to PDF (HTML is a string) and it’s taking upwards of 30 seconds to convert. Here’s the code I’m using, and attached is the html and the resulting PDF.
// Applying license omitted for brevity
// the variable html is the input to the method and is a string
Aspose.Pdf.HtmlLoadOptions options = new Aspose.Pdf.HtmlLoadOptions();
options.UseNewConversionEngine = true;
options.InputEncoding = “UTF8”;Aspose.Pdf.Document pdfDocument = null;
var bytes = System.Text.Encoding.UTF8.GetBytes(html);
using (var input = new System.IO.MemoryStream(bytes, false))
{
pdfDocument = new Aspose.Pdf.Document(input, options);
}pdfDocument.Save(outputFileName, Aspose.Pdf.SaveFormat.Pdf);