Free Support Forum - aspose.com

Object reference not set to an instance of an object when we convert HTML to Pdf

getting Excetion Object reference not set to an instance of an object
at Aspose.Pdf.Document…ctor(Stream input, LoadOptions options)

HtmlLoadOptions htmloptions = new HtmlLoadOptions();
var pdfMemoryStream = new MemoryStream();
htmloptions.PageInfo.Height = 810;
htmloptions.PageInfo.Width = 1150;
//htmloptions.
// Load HTML file
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(html, htmloptions);
local it is working and dev Enviroment it is giving Error

@vjbanothe

Would you please share your sample source HTML in .zip format with us. Also, please share the environment details i.e. OS Name and version where issue is persisting. We will test the scenario in our environment and address it accordingly.

PS: In case of non-Windows environment, please make sure that all windows fonts are installed in the system where you are processing the files.