Close resources after usage
This commit is contained in:
@@ -126,8 +126,7 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
if (Arrays.equals(pad, pdfSignature)) { // we have a pdf
|
if (Arrays.equals(pad, pdfSignature)) { // we have a pdf
|
||||||
|
|
||||||
|
|
||||||
try {
|
try(PDDocument doc = Loader.loadPDF(IOUtils.toByteArray(pdfStream))) {
|
||||||
PDDocument doc = Loader.loadPDF(IOUtils.toByteArray(pdfStream));
|
|
||||||
// PDDocumentInformation info = doc.getDocumentInformation();
|
// PDDocumentInformation info = doc.getDocumentInformation();
|
||||||
final PDDocumentNameDictionary names = new PDDocumentNameDictionary(doc.getDocumentCatalog());
|
final PDDocumentNameDictionary names = new PDDocumentNameDictionary(doc.getDocumentCatalog());
|
||||||
//start
|
//start
|
||||||
|
|||||||
Reference in New Issue
Block a user