I’m not sure what the problem might be in this case, but running this code does not remove the evaluation message from the generated document:
Hi Francisco,
Hi Francisco,
Document doc = null; <o:p></o:p>
String newFile = null;
try {
com.aspose.pdf.License lic = getLicense("E:\\Package\\file\\Aspose.Total for Java\\Aspose.Total.Java_13Mar2016.lic");
doc= new Document();
if (com.aspose.pdf.Document.isLicensed()) {
System.out.println("License OK"); // console shows 'License OK'
}
else {
System.out.println("No License found");
}
}
catch (Exception e){
System.out.println(e.getMessage());
}
// Save the document in PDF format.
doc.getPages().add().getParagraphs().add(new com.aspose.pdf.TextFragment("Testing document..."));
doc.save("c:/pdftest/LicenseTest.pdf"); // new file contains the Evaluation message.
public static com.aspose.pdf.License getLicense(String licFile) {
// Create license object
com.aspose.pdf.License lic= new com.aspose.pdf.License();
try
{
// Specify the path of license file
lic.setLicense(licFile);
}
catch (Exception e)
{
e.printStackTrace();
}
return lic;
}
I seem to be having this same issue. Is this forum still being monitored? If I provide my license and class would you be able to test and confirm that the license is being loaded correctly?
@wwanamaker,
Sure, this forum is alive and you can send your license and class for testing. It is better that you create a new thread on the respective forum like if you are facing issue using Aspose.PDF, then post your query here. You may ensure that you do not share license on a public thread so mark your thread Private and then share your license and class. We will look into it and provide assistance accordingly.
Thanks! I’ll start a new thread on aspose.words. Thank you!