Set License Separately for Each Aspose API to Remove Evaluation Mode Limitations | Create Documents from Scratch using C# .NET

Hi. My newly created word document contains this message: “Evaluation Only. Created with Aspose.Words. Copyright 2003-2019 Aspose Pty Ltd.”. I need to get rid of it since I purchased a license.

My license expired in 2019 (20190401) but this shouldn’t be an issue, right? The license expiry date is for paid support as far as i know. One should be able to use the Aspose solution as long as they paid for a license.

Im receiving this when Im trying to create a new word document.
The license is set before creating a new document. The document does not exists before creation. I insert some hello world text in it.

This is called in my Startup Class. Its a .net core 3.1 web app.

Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(“Aspose.Total.lic”);

And this is called in my home controller:

var path = Path.Combine(Directory.GetCurrentDirectory(), “wwwroot”, “documents”, “test.docx”);
var doc = new WordDocument(path);
doc.CreateNewDocument();

The WordDocument class is this:

public class WordDocument {
private Document Document { get; set; }
private string Path { get; set; }

    public WordDocument(string path) {
        Document = new Document();
        Path = path;
    }

    public void CreateNewDocument() {
        DocumentBuilder builder = new DocumentBuilder(Document);
        builder.Writeln("Hello World!");

        Document.Save(Path);
    }

}

Thank you!

@dustyenterprise,

This means that the expiry date of your license file is 1st April, 2019. It also says that your current license has expired and should you want to use the latest version of Aspose.Words i.e 20.5, you need to renew your subscription. For renewing/upgrading a subscription or any licensing related questions, please contact our sales team via Aspose.Purchase forum.

However, your license should work fine if you decide to choose an older version of Aspose.Words i.e. published before 2nd April, 2019. Please try Aspose.Words for .NET 19.3 and it should not inject evaluation (watermark) message in the generated document.

Please let me know if I can be of any further assistance.

Hi.

I am using 19.3 and I’m still receiving the mentioned message. I double checked right now.

@dustyenterprise,

Please post your license file ‘via private message’. In order to send a private message with attachment, please click on my name and find “Message” button.

Setting or Applying Aspose.Words licence

We will then investigate the issue with your license file on our end and provide you more information.

P.S. Please do not share your license file publicly in forum threads.

@dustyenterprise,

Thanks for sharing your license file via private message. But, the license file you shared is working perfectly fine when for example testing it with the (19.3) version of Aspose.Words for .NET on our end. I have prepared a small application. Please copy your license file (Aspose.Total.lic) in the following Debug folder, restore Aspose.Words’ 19.3 NuGet package, Build and Run the application.

“~\LicenseTest\bin\Debug”

Please let me know if I can be of any further assistance.

Thank you. Your license test code made me realize I didnt set the license for every Aspose component I was using.

My new license setting code looks like this now and it works:

Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();
Aspose.Words.License wordsLicense = new Aspose.Words.License();
pdfLicense.SetLicense(“Aspose.Total.lic”);
wordsLicense.SetLicense(“Aspose.Total.lic”);

In the previous iteration of my code I was setting the license only for Aspose.Pdf.

Thank you!

@dustyenterprise,

Thanks for your feedback. Yes, you need to set the license separately for each Aspose API that you are using.

In case you may have further inquiries or need any help in future, please let us know.