diff options
Diffstat (limited to 'pdf-as-pdfbox/src/main/java/at/gv')
-rw-r--r-- | pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/PDFBOXObject.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/PDFBOXObject.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/PDFBOXObject.java index ef4c055c..d3babcb2 100644 --- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/PDFBOXObject.java +++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/PDFBOXObject.java @@ -47,7 +47,9 @@ public class PDFBOXObject extends PDFObject { if(doc != null) { doc.close(); } - this.doc = PDDocument.load(this.originalDocument.getInputStream()); + synchronized(PDDocument.class) { + this.doc = PDDocument.load(this.originalDocument.getInputStream()); + } if(this.doc != null) { this.doc.getDocument().setWarnMissingClose(false); } |