License file is not removing evaluation message

Hi,

I am trying to convert PDF file to Html using aspose and .NET. I have tried the evaluation where it says it can extract only the first page of the PDF.

Now to convert the entire file, I have bought aspose Total License already. I have also added the license to my code to ensure it is picked up correctly. Here is the code I am using :

var location = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string licensePath =  location + "\\asposeLic\\Aspose.Total.NET.lic";

Aspose.Pdf.License license = new Aspose.Pdf.License(); 
license.SetLicense(licensePath);

After these lines, I am doing the original process of Getting Html from PDF. 

var doc = new Aspose.Pdf.Document(this.OriginalFileStream);

                        foreach (var page in doc.Pages)
                        {
                            //var docPage1 = doc.Pages[1];

                            var docItem = new Aspose.Pdf.Document();
                            docItem.Pages.Add(page);
                        }
                        using (MemoryStream singlePageMemoryStream = new MemoryStream())
                        {
                            //Aspose.Pdf.HtmlSaveOptions opts = new Aspose.Pdf.HtmlSaveOptions(Aspose.Pdf.HtmlDocumentType.Html5);

                            doc.Save(singlePageMemoryStream);
var Wdoc = new Document(singlePageMemoryStream);
HtmlSaveOptions opts = new HtmlSaveOptions(SaveFormat.Html);
opts.ExportImagesAsBase64 = true;                            
Wdoc.Save(writer, opts);
var htmlString = sr.ReadToEnd()

But the problem is, I am still seeing the “Evaluation Purpose” message in the html and also the extraction only generates the first page.

I can confirm that the file which is downloaded as lic file exists properly in the same location from where it is picked up.

Can you please help me in this regard…

@ResNav

It looks like you are using more than one Aspose APIs in your code. Please note that you need to set the license for each and every Aspose API you are using in your code snippet:

Aspose.Pdf.License license = new Aspose.Pdf.License(); 
license.SetLicense(licensePath);
Aspose.Words.License wlicense = new Aspose.Words.License(); 
wlicense.SetLicense(licensePath);

In case issue still persists, please share a sample console application with us which is able to replicate the issue. We will test the scenario in our environment and address it accordingly.