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

Free Support Forum - aspose.com

Evaluation Header

We are using Words version 15.2.1.

Our license file shows 20160107

We create a word document using a template and the mailmerge function of Aspose Words. This works fine with no evaluation header. Then when the user is ready to finalize the document we open it with Aspose Words and change the extension from .doc to .pdf and save the file. This is when the evaluation header is put on the PDF file.
The code for the convert to PDF:

Private Sub ConvertToPDF(ByVal sPath As String, ByVal sFile As String)
Dim license As New Aspose.Words.License()
Dim doc As Aspose.Words.Document, sPDFFile As String

doc = New Aspose.Words.Document(sPath & sFile)
sPDFFile = Replace(sFile, “doc”, “pdf”)
doc.Save(sPath & sPDFFile, SaveFormat.Pdf)
End Sub

Thanks for your assistance.

Some more info: it works when run on my development PC. The evaluation header gets put on when run from the production server.

Hi Russ,

Thanks for your inquiry. First off, we suggest you please always use the latest version of Aspose.Words as it contains newly introduced features, enhancements and fixes for issues reported earlier. So, please upgrade to the latest version 15.9.0 as your license allows it:

Secondly, I would like to mention a few points here:

  • 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.

Best regards,

Thanks for your response. I have already done all of the steps you mention as I had found a similar post on your site.

Hi Russ,

Thanks for your inquiry. Did you manage to fix the issue on your side or are you still in need of assistance? There should not be a problem if you have same copy of license file and same Aspose.Words version on local and server machines. Please make sure that the path you mention in SetLicense method resolves correctly on server machine. Also, please check the articles mentioned here.

Best regards,

I have not fixed it. It does not happen from my development machine but does on the server. I have verified that the versions of the dll and lic files are the same on both machines. I use the following code (from your site) to set the license:

Dim license As New Aspose.Words.License()

Both ddl and lic file are located in the bin directory on the server.

Hi Russ,

Thanks for your inquiry. After an initial test, I was unable to reproduce this problem on my side. It seems your ASP.Net application is not having enough access permissions on the folder containing your license file. In order to resolve this problem, I would like to suggest you the following work around:

Place Aspose.Words.lic on the root directory of your web site.
Open Global.cs and in Application_Start event paste the following code:

void Application_Start(object sender, EventArgs e)
Aspose.Words.License license = new Aspose.Words.License();
FileStream stream = File.Open(Server.MapPath("~/Aspose.Words.lic"), FileMode.Open);

I hope, this will help.

Best regards,

I originally had this code in the Global.vb file but it caused the response time in the application to increase to an unacceptable length of time. Not sure why because I have other customers where I had done that and it worked fine but at this customer response time went from 1-2 seconds to 30-60 seconds. I will try it again and let you know the results.

Hi Russ,

Thanks for your inquiry. Please let us know if you have any troubles and we will be glad to look into this further for you.

Best regards,