@Test
    public void testIgnoreContentStreamSpaceGlyphs() throws Exception {
        PDFParser parser = new PDFParser();
        // Default is false (keep spaces, don't sort):
        XMLResult r = getXML("testContentStreamSpaceGlyphs.pdf", parser);
        assertContains("(                                      )overlap", r.xml);

        parser.getPDFParserConfig().setIgnoreContentStreamSpaceGlyphs(true);
        r = getXML("testContentStreamSpaceGlyphs.pdf", parser);
        assertContains("( )overlap", r.xml);
        parser.getPDFParserConfig().setSortByPosition(true);
        r = getXML("testContentStreamSpaceGlyphs.pdf", parser);
        assertContains("( overlap )", r.xml);

        //now try with autodetect
        ParseContext context = new ParseContext();
        PDFParserConfig config = new PDFParserConfig();
        context.set(PDFParserConfig.class, config);
        r = getXML("testContentStreamSpaceGlyphs.pdf", context);
        // Default is false (keep spaces, don't sort):
        assertContains("(                                      )overlap", r.xml);

        config.setIgnoreContentStreamSpaceGlyphs(true);
        r = getXML("testContentStreamSpaceGlyphs.pdf", context);
        assertContains("( )overlap", r.xml);
        config.setSortByPosition(true);
        r = getXML("testContentStreamSpaceGlyphs.pdf", context);
        assertContains("( overlap )", r.xml);
    }
Test to ensure that Links are extracted from the text
<p/>
Note - the PDF contains the text "This is a hyperlink" which
a hyperlink annotation, linking to the tika site, on it. This
test will need updating when we're able to apply the annotation
to the text itself, rather than following on afterwards as now
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-pdf-module/src/test/java/org/apache/tika/parser/pdf/PDFParserTest.java