Issues while applying license

Hi @alexey.noskov, I have claimed temporary license & imported dependencies of 18.7 version, in order to verify left side spaces removing issue in my local. But I’m facing some issues while applying license. Is there any additional configuration required? Do we have any documentation to apply license. Getting issue in license.setLicense method.

@ankita.bibave Could you please specify what issues you experienced while using the license?

You should apply license in your code, like this:

Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense("C:\\Temp\\Aspose.Words.lic");

Please see our documentation to learn more about applying the license:
https://docs.aspose.com/words/net/licensing/

Also, is there a reason why you use old 18.7 version, which has been released about 5 years ago? The latest version of Aspose.Words is 23.2.

@alexey.noskov, I updated license path in setLicense method. But it is giving exception- “Signature length not correct: got 256 but was expecting 128”.
As left sided spaces issue got resolved in 18.7 version, that’s why I’m checking with this version.

@ankita.bibave Usually such issue occurs when a new license is used with old version of Aspose.Words (pre 17.10.0 version). You should use your old license with the old version of Aspose.Words and new license with the new version.
But the license should work fine with 18.7 version. Most likely your application still uses the old version (pre 17.10.0 version). Anyways, I would suggest you to use the latest version of Aspose.Words.

@alexey.noskov, as per your suggestion I have updated latest version of Aspose. Also updated setLicense method as per your previous reply. Currently it is giving “org.apache.wicket.WicketRuntimeException: There is no application attached to current thread FelixDispatchQueue” exception. Anything needs to update?

@ankita.bibave It does not seem that the exception is related to Aspose.Words. But could you please provide a full stack trace of the exception to check whether it is related to Aspose.Words or not?

@alexey.noskov, while creating object of license I’m getting this error. & It is throwing an exception. Im trying to create object by using -
com.aspose.words.License license = new com.aspose.words.License();

@ankita.bibave Thank you for additional information. It looks like Aspose.Words package is no available. Please make sure reference to Aspose.Words is added properly.

Hi @alexey.noskov, do we have any facility to add left side spaces in XML document?
I wanted to print left side spaces on next line & then start remaining text. On next line I have to start text exactly below the tag. Please refer image. Can you please confirm on this?

@ankita.bibave It looks like you need to pretty format your XML document. This task is out of Aspose.Words scope. Please see the similar question on stackoverflow:
https://stackoverflow.com/questions/139076/how-to-pretty-print-xml-from-java

Though, when you save XML like formats (FlatOpc, WordML etc) or HTML, you can specify SaveOptions.PrettyFormat option to the output XML/HTML has a pretty format.