Free Support Forum - aspose.com

Temporary License Causes Error When Opening Document

I downloaded the evaluation version to check out the features of Aspose.Words. My application opened a word doc, inserted another doc into the original bookmarks and then saved the original doc. When you opened the original doc, you would see the inserted bookmark along with the Aspose watermarks saying that this was an evaluation copy.

I then received a temporary license from Aspose yesterday. I ran the exact same code but when I tried opening the original document, I received the following error:

"The file .... cannot be opened because there are problems with the contents"

I then stripped down my code to do the following: Open a doc and save a doc. I received the same error message.

When I removed the license file, everything worked.

Any ideas?

Hi Howard,

Thanks for your inquiry.

Can you please attach your input word document(s) along with code snippet to reproduce the issue? So far, investigations in this regard have not revealed any issue on our side and it will surely help us in investigating issue(if any) in more detail.

Apart from this, the right way to enable the license is that you should use the License.SetLicense method to license the Aspose.Words component. Often the easiest way to set a license is to put the license file in the same folder as Aspose.Words dll/your executable and specify just the file name without path as shown in the following example:

Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense("Aspose.Words.lic");

Hope this answers your query. Please let us know if you have any more queries.

Best Regards,
Muhammad Iqbal
Support Developer
Aspose Sialkot Team
Aspose - Your File Format Experts
Keep in touch! We're on Twitter and Facebook

Attached is a zip file that includes a Word Doc plus a very simple application.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

The application opens the document and then saves it back to the original name.

Here are the steps to reproduce my issue:

1. Make copy of hjc.docx file

2. Comment out the 2 lines that set the license and run the application.

3. Run application

4. Open the word doc.

5. Doc opens without a problem.

6. Document is truncated because this is an evaluation copy of the software.

7. Delete hjc.docx

8. Rename copied file from step 1 to hjc.docx

9. Uncomment out the 2 lines that set the license

10. Run the application

11. Open the word doc

12. Error Occurs

Hopefully, you can reproduce this and see what my problem is.

Hi Howard,


Thanks for sharing the details. I was able to reproduce the issue using the document you provided and have logged this issue as WORDSNET-7638 in our issue tracking system. I have also linked this forum thread to the issue so that you will be notified via this thread as soon as the issue is resolved.


We apologize for inconvenience. Please do let us know if you have any more queries.


Best Regards,
Muhammad Iqbal
Support Developer
Aspose Sialkot Team
Aspose - Your File Format Experts
Keep in touch! We're on Twitter and Facebook

The issues you have found earlier (filed as WORDSNET-7638) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.