Skip to content

Commit

Permalink
#251 #224 #215 - Do not print a stack trace when there are problems w…
Browse files Browse the repository at this point in the history
…ith our close font workaround. [ci skip]

This really needs a release of PDFBOX 2.0.12 for a proper fix.
  • Loading branch information
danfickle committed Jul 14, 2018
1 parent 20a2807 commit 87a1a9c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ public void close() {
/*
* If the font is not yet subset, we must subset it, otherwise we may leak a
* file handle because the PDType0Font may still have the font file open.
*
* FIXME: Remove this as soon as we begin using PDFBOX 2.0.12 as it correctly closes
* all fonts opened with a PDDocument.
*/
if (fontDescription._font != null && fontDescription._font.willBeSubset()) {
try {
fontDescription._font.subset();
} catch (IOException e) {
e.printStackTrace();
//e.printStackTrace();
}
}
}
Expand All @@ -107,7 +110,7 @@ public void close() {
try {
collection.close();
} catch (IOException e) {
e.printStackTrace();
//e.printStackTrace();
}
}
_collectionsToClose.clear();
Expand Down

0 comments on commit 87a1a9c

Please sign in to comment.