Free Support Forum - aspose.com

Garbage text on first generation

Hello,

I always have a problem when I launch the document generation for the first time : the garbage text appears in the document (I have a licensed version of aspose.word).

After this first time, everything is ok.

Could you help me ?

Thanks,

Jérôme

Verify that the license setting occurs before any other actions are done in your project:

The best way of setting license is the followinng:

  1. Include license file in your project as an embedded resource.
  2. Execute the following code in the beginning of your main() procedure, like

[STAThread]

static void Main() {

License license = new License();

license.SetLicense("Aspose.Word.lic");

Application.Run(new Form1());

}

That way you will have license file safely inside your exe, which eliminates the need to redistribute it with your application.

Ok, thank you,

But it's for an asp.net application

I add his code in the application_start (global.asax) :

Aspose.Word.License lsc = new Aspose.Word.License();

lsc.SetLicense("Aspose.Word.lic");

an it seems to be working fine...