We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem is license with Words on Coldfsuion server

I have a coldfusion page that creates a word document then emails it to the user.

Up to last week it was working fine, now I get the “Evaluation Only. Created with Aspose.Words. Copyright 2003-2011 Aspose Pty Ltd.**”

The code I am using is below:-

<cfset doc=CreateObject("java", "com.aspose.words.Document").init("/var/www/vhosts/dev.xxxx.com/httpsdocs/xxxx/xxx_web/version/SV2/report/#repLanguage#/deals/#fileID#/report.html")>
<cfset LicfileI = LicFile.init(JavaCast("string","/var/www/vhosts/dev.xxxx.com/httpsdocs/xxxx/xxx_web/version/SV2/report/#repLanguage#/Aspose.Total.Java.lic"))>

<cfset saveFormat=CreateObject("java", "com.aspose.words.SaveFormat")>
<cfset doc.save("/var/www/vhosts/dev.xxxx.com/httpsdocs/xxxx/xxx_web/version/SV2/report/#repLanguage#/deals/#fileID#/report.doc", saveFormat.DOC)>

Do you know of any reason why this may now be occuring.

Kind Regards


Thanks for your reqyest. Please make sure that the license exists on the following path.
Also please make sure that code executes without exceptions.
Hope this could help you.
Best regards.

The file exists in the correct location as nothing has changed and the word document creates correctly just with the evaluation watermark

Thank you for additional information. I’m afraid it is difficult to say what is wrong on your side. Have you tried doing the same on other machine?
Best regards,

no, the file is created on the server, I do not have another server just to test on.

Is the code above the correct way to use a license file in coldfusion?

Thanks for your request. Please try using code like the following:

<cfset lic=CreateObject("java", "com.aspose.words.License").init()>
<cfset lic.setLicense("C:\\Temp\\Aspose.Words.lic")>

Also, as I can see you are setting the license after instantiating Document object, But you should set the license before create any other Aspose.Words objects.
Hope this helps.
Best regards,

Thank you Alexey, that did the trick. Although I am still a little confused as to why it had been working.

It is perfect that issue is resolved. Unfortunately, I also do not have any idea why it worked and then stopped.
Best regards,