private void parseIncrementalUpdate(int count, Path path, StartXRefOffset xRefOffset)
            throws SAXException, IOException {
        TemporaryResources tmp = new TemporaryResources();
        try {
            Path update = tmp.createTempFile();
            try (InputStream input = Files.newInputStream(path);
                    OutputStream outputStream = Files.newOutputStream(update, StandardOpenOption.WRITE)) {
                IOUtils.copyLarge(input, outputStream, 0, xRefOffset.getEndEofOffset());
            }
            Metadata updateMetadata = new Metadata();
            updateMetadata.set(PDF.INCREMENTAL_UPDATE_NUMBER, count);
            updateMetadata.set(TikaCoreProperties.EMBEDDED_RESOURCE_TYPE,
                    TikaCoreProperties.EmbeddedResourceType.VERSION.toString());
            if (embeddedDocumentExtractor.shouldParseEmbedded(updateMetadata)) {
                try (TikaInputStream tis = TikaInputStream.get(update)) {
                    context.set(IsIncrementalUpdate.class, IsIncrementalUpdate.IS_INCREMENTAL_UPDATE);
                    embeddedDocumentExtractor.parseEmbedded(tis, xhtml, updateMetadata, false);
                }
            }
        } finally {
            tmp.close();
        }
    }
Format used for signature dates
TODO Make this thread-safe
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-pdf-module/src/main/java/org/apache/tika/parser/pdf/AbstractPDF2XHTML.java