Fixed memory leak in the merge pdf method.
This commit is contained in:
parent
e460eca472
commit
b82586bb82
|
@ -625,8 +625,10 @@ public final class AEnv
|
|||
PdfContentByte cb = copy.getDirectContent();
|
||||
for (int i = 1; i <= pages; i++) {
|
||||
document.newPage();
|
||||
copy.newPage();
|
||||
PdfImportedPage page = copy.getImportedPage(reader, i);
|
||||
cb.addTemplate(page, 0, 0);
|
||||
copy.releaseTemplate(page);
|
||||
}
|
||||
}
|
||||
document.close();
|
||||
|
|
Loading…
Reference in New Issue