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