when processing several pdf I get this exception “Exception in thread “main” java.lang.OutOfMemoryError: Java heap space”
//this is the code I am using
for (String archivo : carpeta.list()) {
Document pdfDocument = new Document(_dir + “/” + archivo);
// convertir a pdf/a
pdfDocument.convert(_dir + “/log.xml”, PdfFormat.PDF_A_1A,ConvertErrorAction.Delete);
nombrearchivo = pdfDocument.getFileName();
pdfDocument.save(“src/out-pdf/” + nombrearchivo);
pdfDocument.close();
}