Sign In  Sign Up Live-Chat

apply licence

Last post 07-11-2008, 3:39 AM by alexey.noskov. 3 replies.
Sort Posts: Previous Next
  •  07-10-2008, 7:08 AM 135050

    apply licence

    I have just bought a developer licence for word and pdf tool and i have to apply the licence key, but i don't have understood where i must write the follow line of code
    (com.aspose.words.License license = new com.aspose.words.License();
    license.setLicense("Aspose.Words.lic");)
    and where i can find the file Aspose.Words.dll,thanks.


    This message was posted using Page2Forum from Applying a License - Aspose.Words for .NET and Java
     
  •  07-10-2008, 7:31 AM 135055 in reply to 135050

    Re: apply licence

    Hi

     

    Thanks for your inquiry. Please see the following links to learn how and when to apply license:

    http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/applying-a-license.html

    http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/when-to-apply-a-license.html

     

    You can find Aspose.Words.dll in the following folder on your PC:

    C:\Program Files\Aspose\Aspose.Words\Bin\net2.0 or net1.1

     

    If you are using Java version of Aspose.Words (as I see from your code) then there is no dll there is Aspose.Words.jar.

     

    Best regards.


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  07-11-2008, 1:26 AM 135193 in reply to 135055

    Re: apply licence

    So, i have put the licence key into the folder with Aspose.Words.jar, but i' m using the aspose features in integration with a Business Process Management (BPM) software and i didn't understand where i have to put correctly the line code to implement the setlicense method, if you can help me, thanks.
     
  •  07-11-2008, 3:39 AM 135202 in reply to 135193

    Re: apply licence

    Hi

     

    Thanks for your inquiry. You need to set a license before performing any operations with documents. Make sure you do it before instantiating a Document object. It is only required to set a license once per application or process. So you should set license when your application starts.

     

    For example if your application is simple console application then you should use th following code:

     

    public class Main {

     

        public static void main(String[] args) throws Exception {

     

            //Set license

            License lic = new License();

            lic.setLicense("Aspose.Words.lic");

     

            //Build document

            Document doc = new Document();

            DocumentBuilder builder = new DocumentBuilder(doc);

            //Here you should build your document

            //.....................................

            builder.write("Hello world");

            //.....................................

            doc.save("out.doc");

        }

    }

     

    Hope this helps.

     

    Best regards.


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
View as RSS news feed in XML