Hello,
We are facing multiple issues when trying to use Aspose.HTML in a UWP app.
-
the license file cannot be loaded via the following code:
var license = new Aspose.Html.License(); var assembly = this.GetType().GetTypeInfo().Assembly; var resource = assembly.GetManifestResourceStream("xxx.Assets.Aspose.Total.lic"); license.SetLicense(resource);
The last line generates the following exception:
Assembly.Load(byte[], …) is not supported in AppX.
Note: if I run the same code but with Aspose.Cells.License() instead of Aspose.Html.License(), it works fine.
-
If I remove the code above and move on, there is another issue:
var doc = new HTMLDocument(); doc.DocumentElement.OuterHTML = "<p>Hello World</p>"; Aspose.Html.Converters.Converter.ConvertHTML(doc, new PdfSaveOptions(), Path.Combine(ApplicationData.Current.LocalFolder.Path, "test.pdf"));`
The last line throws the exception:
System.PlatformNotSupportedException: ‘System.Drawing is not supported on this platform.’
at System.Drawing.Drawing2D.Matrix…ctor(Single m11, Single m12, Single m21, Single m22, Single dx, Single dy) (…)
I’ve checked and these issues do not appear when I run the same code in a non-UWP project with Aspose.HTML 20.4.0 but targets .NET framework 4.6.1.
Unfortunately I cannot provide the full code to reproduce this issue due to insufficient permissions in my environment.
Any ideas why these issues appear in the UWP app but not in the .NET 4.6.1 project ?
Thanks