public static void ImportLicense() { var asposeLicenseValue = File.ReadAllText("./license.txt"); if (string.IsNullOrEmpty(asposeLicenseValue)) { return; } using var stream = new MemoryStream(); using var write = new StreamWriter(stream); write.Write(asposeLicenseValue); write.Flush(); stream.Position = 0; var docLicense = new Aspose.Words.License(); docLicense.SetLicense(stream); stream.Position = 0; var pdfLicense = new Aspose.Pdf.License(); pdfLicense.SetLicense(stream); stream.Position = 0; var imagingLicense = new Aspose.Imaging.License(); imagingLicense.SetLicense(stream); stream.Position = 0; var htmlLicense = new Aspose.Html.License(); htmlLicense.SetLicense(stream); }
///<Summary> /// SetAsposeHtmlLicense method to Aspose.Html License ///</Summary> public static void SetAsposeHtmlLicense() { Aspose.Html.License lic = new Aspose.Html.License(); lic.SetLicense("Aspose.Total.lic"); }