@Override
    public void endDocument() {
        metadata.set("PageCount", String.valueOf(bodyPageCount));
        metadata.set("MasterPageCount", String.valueOf(masterPageCount));
        metadata.set("ReferencePageCount", String.valueOf(referencePageCount));
        metadata.set("TotalPageCount",
                String.valueOf(bodyPageCount + referencePageCount + masterPageCount));
    }
Default content handler for MIF Content and Metadata.

@param handler  the base content handler to use.
@param metadata the metadata collection to populate.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-miscoffice-module/src/main/java/org/apache/tika/parser/mif/MIFContentHandler.java