Temporary license does not work using Java

I am trying to setup the temporary license using the below code. But it is not working, in the sense that it is suppose to work on the entire document and not just first 3 pages. Also the watermark is still present. Please help setting up this temporary license, so that I can get the full access of the product for the limited time.

		License license = new License();
		license.setLicense(new FileInputStream(new File("D:/Aspose.Words.lic")));
		Document docA = new Document("D:/updated.docx");
		Document docB = new Document("D:/original.doc");
		docA.acceptAllRevisions();
		docB.acceptAllRevisions();
		CompareOptions options = new CompareOptions();
		options.setTarget(ComparisonTargetType.CURRENT);
		docB.compare(docA, "user", new Date(), options);
		docB.save("D:/result.doc");

@adutta

Please make sure that you are not using the expired license. You can check the expiry date of your license by opening the license file in notepad. You will see the following tag in your license file:

<SubscriptionExpiry>20200218</SubscriptionExpiry>

It means that you can free upgrade to a version of Aspose.Words that is published before 02/18/2020.

If your license is expired, please request for 30 days temporary license again.

Thanks… it is working fine now… able to apply the license successfully…

@adutta

Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.