void extractImages(PDPage page) throws SAXException, IOException {
        if (config.isExtractInlineImages() == false &&
                config.isExtractInlineImageMetadataOnly() == false) {
            return;
        }
        //TODO: modernize to ImageStratey != rawImages
        ImageGraphicsEngine engine =
                config.getImageGraphicsEngineFactory().newEngine(
                        page, getCurrentPageNo(), embeddedDocumentExtractor, config,
                        processedInlineImages, inlineImageCounter, xhtml, metadata, context);
        engine.run();
        List<IOException> engineExceptions = engine.getExceptions();
        if (!engineExceptions.isEmpty()) {
            IOException first = engineExceptions.remove(0);
            if (config.isCatchIntermediateIOExceptions()) {
                exceptions.addAll(engineExceptions);
            }
            throw first;
        }
    }
Converts the given PDF document (and related metadata) to a stream
of XHTML SAX events sent to the given content handler.

@param document PDF document
@param handler  SAX content handler
@param metadata PDF metadata
@throws SAXException  if the content handler fails to process SAX events
@throws TikaException if there was an exception outside of per page processing
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-pdf-module/src/main/java/org/apache/tika/parser/pdf/PDF2XHTML.java