I have a Java application that uses both Aspose Imaging and Aspose PDF. I can set the license for Aspose Imaging but get an error when attempting to set it for Aspose PDF. The code to set the license is:
com.aspose.imaging.License iLicense = new com.aspose.imaging.License();
com.aspose.pdf.License pLicense = new com.aspose.pdf.License();
pLicense.setLicense( DocumentUtilities.class.getClassLoader() .getResourceAsStream("META-INF/lib/Aspose.Total.Java.lic")); iLicense.setLicense( DocumentUtilities.class.getClassLoader() .getResourceAsStream("META-INF/lib/Aspose.Total.Java.lic"));
NOTE - if the imaging license is set first it works OK but the PDF license always fails, whether it is invoked before or after imaging.
The exception thrown is:
org.xml.sax.SAXParseException; lineNumber: 20; columnNumber: 3; The element type “License” must be terminated by the matching end-tag “”.
As far as I can see the Aspose Total license file is fine (it does have a closing element) and like I said the Aspose Imaging license works fine.