Evaluation Only. Created with Aspose.Words. Copyright 2003-2018 Aspose Pty Ltd

Hello,

We have a valid Aspose.Total for .NET license. Recently, we have changed some .Visio files to .Word files and received the following issue: Evaluation Only. Created with Aspose.Words. Copyright 2003-2018 Aspose Pty Ltd..

Some information:

  • Issue happens to .Word file.
  • Issue seems to happen randomly, since some files have while others haven’t those text.

Can you give me some suggestion?
Thanks

@siouxeu

Thanks for your inquiry. Please post your license file via private message. In order to send a private message with attachments, please click on my name and find “Message” button. (see the screenshot). We will investigate the issue on our end and provide you more information. Please do not share your license file publicly.

Also, please ZIP and upload your input documents you are getting this problem with here for testing.

Thanks for your cooperation.

@siouxeu

We have tested your provided documents and license and have not found shared issue. Aspose.Words inserts the following evaluation watermark at the top of generated document when it encounters any problems during setting license. Please make sure that you have applied the license correctly.

You can also verify if the license is properly set by using the following code:

Aspose.Words.License lic = new Aspose.Words.License();
lic.SetLicense(MyDir + @"Aspose.Total.lic");

if (lic.IsLicensed)
{
    // to do
}

Hope, this helps.

Please check attached documents for your reference.
STE.QSM.TUR-01 QSM_19.1.zip (173.1 KB)
SUP.IT.TUR-01 IT_19.1.zip (164.9 KB)

If you see following additional content (images & text in red color) in output documents then this means that you are using Aspose.Words’ API in evaluation mode:

  1. Evaluation Only. Created with Aspose.Words. Copyright 2003-2021 Aspose Pty Ltd. This text will be injected to the very first Paragraph at the start of Document’s Body. Its exact position in DOM (Document Object Model) will be: Document > First Section > Body > First Paragraph

  2. This document was truncated here because it was created in the Evaluation Mode. This red text will become the very last Paragraph and appear at the end of Document’s Body. And its exact position in DOM will be: Document > Last Section > Body > Last Paragraph

  3. As shown below, a logo image of Aspose will appear at the center of all the Pages as watermark.

Evaluation Only. Created with Aspose.Words. Copyright 2003-2021 Aspose Pty Ltd

Aspose.Words will inject this watermark image inside the Primary Headers of all the Sections of Document. The exact positions of these images in DOM will be: Document > All Sections > Primary Header > First Paragraph > First Watermark Shape

  1. Created with an evaluation copy of Aspose.Words. To discover the full versions of our APIs please visit: https://products.aspose.com/words/ This text will be inserted inside the Primary Footers of all the Sections of Document. The exact position of this red text in Aspose.Words’ DOM will be: Document > (All) Sections > Primary Footer Story > First Paragraph

  2. File Size limitations: Aspose.Words also imposes this constraint and limits the maximum document size to a few hundred paragraphs when using it in evaluation mode without applying license.


To stop Aspose.Words from injecting these evaluation watermark messages in output Word, PDF, XPS, HTML (and many other supported file formats), you need to either call License.SetLicense or Metered.SetMeteredKey methods before instantiating any Document instance or using any other Aspose.Words classes. Please refer to Licensing and Subscription section of Aspose.Words’ documentation for more information.

Sometimes, even after calling the License.SetLicense or Metered.SetMeteredKey methods on a valid license file/keys, you still see evaluation watermark messages in output documents. In such case, please check for the following:

  • Check if your application has permissions to access/read directory/file
  • Make sure your call to SetLicense or SetMeteredKey gets always executed. Debug your program and step through in the debugger to identify the problematic line of code.
  • Make sure your code does not silently catch an exception thrown by Aspose.Words licensing code. For example, Aspose.Words will throw if it cannot find the license.
  • Make sure SetLicense or SetMeteredKey method is executed before you instantiate any Document object
  • Open (but do not edit) your .lic file with Notepad and check the subscription expiry date. Make sure you are not using a version of Aspose.Words that is released after your license expiry date.

Check if a Purchased or 'Free Trial' Aspose.Words' License is Applied?

To avoid evaluation watermark messages in output Word document, you can also declare a global variable to determine whether a valid license has been applied before starting document processing. Please check the following C# code of Aspose.Words for .NET API.

using Aspose.Words;
using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            License license = new License();
            var isLicensed = false;
            try
            {
                license.SetLicense(@"C:\path to license file.lic"); 
                isLicensed = true;
            }
            catch (InvalidOperationException)
            {
                // the License.SetLicense() method will throw InvalidOperationException
                // for an invalid/wrong/expired license etc.
                isLicensed = false;
            }

            if (isLicensed)
            {
                Console.WriteLine("License is fine & Aspose.Words now is not running in evaluation mode");

                Document doc = new Document();
                DocumentBuilder builder = new DocumentBuilder(doc);

                builder.Writeln("Avoiding Evaluation Only. Created with Aspose.Words. Copyright 2003-2021 Aspose Pty Ltd");
                // Lets convert Word document to PDF file
                doc.Save(@"C:\Temp\output.pdf");
            }
            else
            {
                Console.WriteLine("License not applied & Aspose.Words is running in Evaluation mode");
            }

            Console.WriteLine("End of process... press any key");
            Console.Read();
        }
    }
}

You can also use the following C# .NET code to determine whether the license was set or not.

private static bool IsLicensed()
{
    const string testString = "test";
    Document doc = new Document();
    DocumentBuilder builder = new DocumentBuilder(doc);
    builder.Write(testString);

    using (MemoryStream ms = new MemoryStream())
    {
        doc.Save(ms, SaveFormat.Docx);
        ms.Position = 0;
        doc = new Document(ms);
    }

    string test = doc.ToString(SaveFormat.Text).Trim();

    return doc.ToString(SaveFormat.Text).Trim() == testString;
}