@Override
    public void parse(InputStream stream, ContentHandler handler, Metadata metadata,
                      ParseContext context) throws IOException, SAXException, TikaException {
        XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);
        xhtml.startDocument();
        try {
            HwmfPicture picture = null;
            try {
                picture = new HwmfPicture(CloseShieldInputStream.wrap(stream));
            } catch (ArrayIndexOutOfBoundsException e) {
                //POI can throw this on corrupt files
                throw new TikaException(e.getClass().getSimpleName() + ": " + e.getMessage(), e);
            }
            Charset charset = LocaleUtil.CHARSET_1252;
            //TODO: make x/y info public in POI so that we can use it here
            //to determine when to keep two text parts on the same line
            for (HwmfRecord record : picture.getRecords()) {
                //this is pure hackery for specifying the font
                //TODO: do what Graphics does by maintaining the stack, etc.!
                //This fix should be done within POI
                if (record.getWmfRecordType().equals(HwmfRecordType.createFontIndirect)) {
                    HwmfFont font = ((HwmfText.WmfCreateFontIndirect) record).getFont();
                    charset =
                            (font.getCharset() == null || font.getCharset().getCharset() == null) ?
                                    LocaleUtil.CHARSET_1252 : font.getCharset().getCharset();
                }
                if (record.getWmfRecordType().equals(HwmfRecordType.extTextOut)) {
                    HwmfText.WmfExtTextOut textOut = (HwmfText.WmfExtTextOut) record;
                    xhtml.startElement("p");
                    xhtml.characters(textOut.getText(charset));
                    xhtml.endElement("p");
                } else if (record.getWmfRecordType().equals(HwmfRecordType.textOut)) {
                    HwmfText.WmfTextOut textOut = (HwmfText.WmfTextOut) record;
                    xhtml.startElement("p");
                    xhtml.characters(textOut.getText(charset));
                    xhtml.endElement("p");
                }
            }
        } catch (RecordFormatException e) { //POI's hwmfparser can \ throw these for "parse
            // exceptions"
            throw new TikaException(e.getMessage(), e);
        } catch (RuntimeException e) { //convert Runtime to RecordFormatExceptions
            throw new TikaException(e.getMessage(), e);
        } catch (AssertionError e) { //POI's hwmfparser can throw these for parse exceptions
            throw new TikaException(e.getMessage(), e);
        }
        xhtml.endDocument();
    }
This parser offers a very rough capability to extract text if there
is text stored in the WMF files.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/WMFParser.java