Hi,
I am on aspose 22.11. After each new deploy on site aspose license load takes lot of time to load. I am basically trying to do below. What can be the reason for slow performance to get final pdf document. It takes more than 5 minute.
My assessment is tha license file load takes lot of time for first time.
asposeLicenseUtil.setAsposePDFLicense();
com.aspose.pdf.Document documents = new com.aspose.pdf.Document();
for (ReceiveLedger ledger : ledgers) {
Invoice invoice = ledger.getInvoice();
byte[] pdfData = generateInvoicePDFNew(invoice, ledger, userCompany);
ByteArrayInputStream documentStream = new ByteArrayInputStream(pdfData);
com.aspose.pdf.Document document = new com.aspose.pdf.Document(documentStream);
documents.getPages().add(document.getPages());
document.close();
documentStream.close();
}
ByteArrayOutputStream output = new ByteArrayOutputStream();
documents.save(output);
documents.close();
return output.toByteArray();
public void setAsposePDFLicense() throws Exception {
com.aspose.pdf.License license = new com.aspose.pdf.License();
File licenseFile =resourceLoaderService.getResource(“classpath:license/Aspose.Total.Java.lic”).getFile();
license.setLicense(Files.newInputStream(licenseFile.toPath()));
}