Great, what object will the “isLicensed” method be available to be called on?
I have Aspose.HTML version 20.6.0 already installed, my sample html code is a simple hello world - used for testing:
The code I’m using to set the license in a constructor as follows:
Aspose.Html.License htmlLicense = new Aspose.Html.License();
using (var stream = new FileStream("Aspose.HTML.lic", FileMode.Open))
// Apply a license using the stream.
Then use the license to convert the HTML above using the following:
using var streamProvider = new MemoryStreamProvider();
// Initialize an HTML document
using var document = new Aspose.Html.HTMLDocument(data, ".");
var pdfSaveOptions = new Aspose.Html.Saving.PdfSaveOptions();
// Convert HTML to PDF by using the MemoryStreamProvider
Aspose.Html.Converters.Converter.ConvertHTML(document, pdfSaveOptions, streamProvider);
// Get access to the memory stream that contains the result data
var memory = streamProvider.Streams.First();
I just thought I’d provide the code just to help you get a insight into how I’m using the toolkit.
Just a side note, it does work locally, but when I release it to a server I get the original “object set to an instance” error