I am passing the html code to create a aspose.pdf document using the stream. The below code works normally in my local system & errors out on the line where i create new document saying unable to initialize the document.
var objLoadOptions = new HtmlLoadOptions();
objLoadOptions.PageInfo.Margin.Bottom = 10;
objLoadOptions.PageInfo.Margin.Top = 10;
objLoadOptions.PageInfo.Margin.Right = 15;
objLoadOptions.PageInfo.Margin.Left = 15;
var pdfHtmlTemplate = htmldata; // generated html data.
**** //Errors out in this line
var doc = new Aspose.Pdf.Document(new memoryStream(Encoding.UTF8.GetBytes(pdfHtmlTemplate)), objLoadOptions);
using MemoryStream documentStream = new MemoryStream();
doc.Save(documentStream, SaveFormat.Pdf);
documentStream.Close();
return Constants.GeneratePDFSuccessMessage;
}
This is not working after deploying to the linux docker container - Need you support in getting this resolved.