Unable to remove watermark

I am trying to convert word to pdf file. There I am getting watermark image and text on every page I am unable to remove them I tried all possible solutions on Aspose Doc.
Please let me know if something there to help

@akki8007 Do you mean an evaluation watermark and message? If so, to avoid them you should apply the license to use Aspose.Words without evaluation version limitations.
You can request a free 30-days temporary license to test Aspose.Words without evaluation version limitations.

@alexey.noskov I am getting “Evaluation watermark.Created with aspose words” on every page and ASPOSE text image in background. How I can get free license to show some demo to clients.

@akki8007 Please see the following link to learn how to get a free temporary license for testing:
https://purchase.aspose.com/temporary-license/

Hi @alexey.noskov I am using temporary license now but still getting watermarks.

@akki8007 You should apply the license in your code before using any Aspose.Words classes:

com.aspose.words.License wordsLic = new com.aspose.words.License();
wordsLic.setLicense("C:\\Temp\\Licenses\\Aspose.Total.Java.lic");

// You code.

Please see our documentation to learn how to apply the license:
https://docs.aspose.com/words/java/licensing/#apply-license-using-a-file-or-stream-object

Also, please check the following points:

  • Make sure your call to SetLicense gets executed. Step through in the debugger.
  • Make sure your code does not catch an exception thrown by Aspose.Words licensing code. For example, Aspose.Words will throw if it cannot find the license.
  • Make sure the input documents do not already have the evaluation message. Aspose.Words does not delete existing evaluation messages.
  • Make sure SetLicense is executed before you instantiate any Document object.

Hi @alexey.noskov
Ya You are right I am getting this
java.io.FileNotFoundException: Aspose.Words.Java.lic: open failed: ENOENT (No such file or directory)

while file is in my directory

Hi @alexey.noskovCapture.PNG (26.7 KB)

@akki8007 Please try reading the License file into an InputStream and apply license from stream. Using such approach you can make sure the license file is there and is accessible through the code.

@alexey.noskov I am trying but file not reading by InputStream.
can you clear where I have to put this file in my code?

@akki8007 You can use code like the following to read a file to input stream:

FileInputStream licenseStream = new FileInputStream("C:\\Temp\\Aspose.Words.Java.lic");

Make sure the specified path is correct and accessible through the code.

@alexey.noskov
I am using android studio. will it work for that?

@akki8007 Yes, it should work in Android too:
https://stackoverflow.com/questions/15653771/load-a-file-from-external-storage-to-inputstream