I am converting a generated html string using Aspose.PDF version 22.8. I am getting the error message “Incompatible unit types”.
byte[] byteArray = Encoding.ASCII.GetBytes(html);
MemoryStream stream = new MemoryStream(byteArray);
Document htmlToPdfResult = new Document(stream, options);
Aspose.PDF works fine on other html strings but not on this one. It also works fine if I comment out all instances of display: flex; in the css, but obviously, then it does not display correctly!
I have attached a sample html file that is a saved result of the html string before being passed to Aspose.SampleHtml.zip (12.6 KB)
I have referenced this post, but as it’s noted as fixed, I don’t believe it’s the same issue: Convert HTML to PDF using C# and Aspose.PDF - Incompatible unit types