We have downloaded the latest versions available on nuget as of 24.08.2015, this means we use version 10.7.0 of Aspose.Pdf.
When trying to convert a html file generated by Office 2015 Outlook, Aspose fails.
Method 1 tried:
This method has been described in documentation and should be the easiest way to convert a html document to PDF.
Code block:
var htmlOptions = new HtmlLoadOptions();
fileToConvert = “424_FIX.HTML”;
var doc = new Aspose.Pdf.Document(fileToConvert, htmlOptions);
doc.Save(destination);
Exception message:
See first attachment
This error message is not helpful at all. What is wrong?
Method 2 tried:
Code block:
fileToConvert = “424_FIX.HTML”;
var pdfDocument = new Pdf();
var file = File.ReadAllText(fileToConvert, Encoding.UTF7);
var sec1 = pdfDocument.Sections.Add();
var text1 = new Aspose.Pdf.Generator.Text(file)
{
IsHtmlTagSupported = true
};
sec1.Paragraphs.Add(text1);
pdfDocument.Save(destination);
Exception message:
See second attachment
The error message in method 2 is correct, the html file does indeed contain mso-margin-top-alt. This is css styling that Office 2015 outlook is generating automaticly.
We need a fix on this problem as this problem is urgent.
Do you have any workaround available right now?