Out of Memory Error when Generating Multiple PDFs using Itext7 library in Java
I have a Java method that generates PDFs from HTML templates using the iText 7 library. The method works fine for generating a small number of PDFs, but when I try to generate a large number (e.g., 1000), I encounter an out-of-memory error.