@Test
public void testExtractInlineImageMetadata() throws Exception {

    ParseContext context = new ParseContext();
    PDFParserConfig config = new PDFParserConfig();
    config.setExtractInlineImageMetadataOnly(true);
    context.set(PDFParserConfig.class, config);
    List<Metadata> metadataList = getRecursiveMetadata("testOCR.pdf", context);
    assertNull(context.get(ZeroByteFileException.IgnoreZeroByteFileException.class));
    assertEquals(2, metadataList.size());
    assertEquals("image/png", metadataList.get(1).get(Metadata.CONTENT_TYPE));
    assertEquals("/image0.png", metadataList.get(1).get(RecursiveParserWrapperHandler.EMBEDDED_RESOURCE_PATH));
    assertEquals(261, (int)metadataList.get(1).getInt(Metadata.IMAGE_LENGTH));
    assertEquals(934, (int)metadataList.get(1).getInt(Metadata.IMAGE_WIDTH));
    assertEquals("image0.png", metadataList.get(1).get(TikaCoreProperties.RESOURCE_NAME_KEY));
}