Exception in evaluation mode

I have following code (taken from examples):

Path fileLocation = Paths.get("/somepath/GroupDocs.WatermarkProductFamily.lic");
        try {
            byte[] data = Files.readAllBytes(fileLocation);
            ByteArrayInputStream inputStream = new ByteArrayInputStream(data);

            License lic = new License();
            lic.setLicense(inputStream);
            System.out.println("License set successfully ... ");

            // Specify an absolute or relative path to your document. Ex: "C:\\Docs\\document.pdf"
            Watermarker watermarker = new Watermarker(inputFilePath);
            PossibleWatermarkCollection possibleWatermarks = watermarker.search();
            // Remove possible watermark at the specified index from the document.
            possibleWatermarks.removeAt(0);

            // Remove specified possible watermark from the document.
            possibleWatermarks.remove(possibleWatermarks.get_Item(0));

            watermarker.save(outputFilePath);
            watermarker.close();

        } catch (Exception e) {
            System.out.println(e.getMessage());

        }

License gets set OK, however I keep getting the: “At most 4 elements (for any collection) can be viewed in evaluation mode.” message.

Any help?

Thanks

@franciscomoralesa

Could you please share following details and we’ll look into this scenario:

  • GroupDocs.Watermark API version that you are using (e.g. 23.12, 24.1)
  • License file (please share in a private message

Hi

I’m using version 23.12. The license I’ll try to send you via pm.

Thanks

@franciscomoralesa

Please share the license file as it is instead of sharing the content (e.g. compress it to a ZIP format and share in private message). Because any minor change in the license can invalidate it.

@franciscomoralesa
This issue is reproduced at our end. Therefore, we have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WATERMARKJAVA-128

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi Atir
Thanks for your answer, is there any version of the API that I could use for our testing and not affected by this bug?
Thanks

@franciscomoralesa

As a workaround, please use GroupDocs.Watermark API version 21.3. However, we’ll notify you in case of any update on WATERMARKJAVA-128.

OK, thanks! Will do.

@franciscomoralesa

You are welcome.