Skip to content

Commit

Permalink
Add StaticCoreContainers to library
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Jun 2, 2024
1 parent 47a8c00 commit 25d7644
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ public final class ModelParser implements PDFAParser {
private ModelParser(final InputStream docStream, PDFAFlavour flavour, PDFAFlavour defaultFlavour) throws IOException {
this.document = PDDocument.load(docStream, false, true);
this.flavour = detectFlavour(this.document, flavour, defaultFlavour);
StaticCoreContainers.setFlavour(this.flavour);
}

private ModelParser(final File pdfFile, PDFAFlavour flavour, PDFAFlavour defaultFlavour) throws IOException {
this.document = PDDocument.load(pdfFile, false, true);
this.flavour = detectFlavour(this.document, flavour, defaultFlavour);
StaticCoreContainers.setFlavour(this.flavour);
}

public static ModelParser createModelWithFlavour(InputStream toLoad, PDFAFlavour flavour)
Expand Down Expand Up @@ -158,6 +160,7 @@ private static PDFAFlavour obtainFlavour(PDDocument document, PDFAFlavour defaul

private static void cleanUp() {
StaticContainers.clearAllContainers();
StaticCoreContainers.clearAllContainers();
StaticXmpCoreContainers.clearAllContainers();
}

Expand Down

0 comments on commit 25d7644

Please sign in to comment.