Free Support Forum - groupdocs.com

Watermark API shows evaluation mark in .NET

i am using license file as attached project but there is a evaluation version message in documentConsoleApp1.zip (56.2 KB)

1 Like

@tilankak

Your temporary license is expired that is why there’s an evaluation message. Have a look at license expiry date.
<LicenseExpiry>20200625</LicenseExpiry>

Thanks
I did not see that

@tilankak

You’re welcome.

cft.gd.zip (811 Bytes)
I have added this license. it works for watermark but when i add password using below code it added evaluation version message.

public static bool ProtectDoc(string FilePath, string OutputPath, string Password)
{
try
{
GroupDocs.Merger.License lic = new GroupDocs.Merger.License();
lic.SetLicense(“cft.gd.lic”);

            using (FileStream fs = new FileStream(FilePath, FileMode.Open))
            {

                AddPasswordOptions options = new AddPasswordOptions(getFileFormat(FilePath), Password);
                GroupDocs.Merger.Domain.Result.DocumentResult result = new DocumentHandler().AddPassword(fs, options);

                fs.Close();
                Stream documentStream = result.Stream;
                var filestream = File.Create(OutputPath);

                documentStream.CopyTo(filestream);
                documentStream.Close();
                filestream.Close();

            }
            return true;
        }
        catch (GroupDocs.Merger.Exceptions.GroupDocsMergerException ex1)
        {
            if (ex1.Message == "Password already exists. Use UpdatePassword")
            {
                throw new Exception("Document is already Protected");
            }
            throw;
        }

        catch (Exception)
        {

            throw;
        }

    }

@tilankak

This query is assisted here.