@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)); }
@Field void setExtractInlineImageMetadataOnly(boolean extractInlineImageMetadataOnly) { defaultConfig.setExtractInlineImageMetadataOnly(extractInlineImageMetadataOnly); }
PDFParser extends AbstractParser implements Initializable { @Field void setExtractInlineImageMetadataOnly(boolean extractInlineImageMetadataOnly) { defaultConfig.setExtractInlineImageMetadataOnly(extractInlineImageMetadataOnly); } }
PDFParser extends AbstractParser implements Initializable { @Field void setExtractInlineImageMetadataOnly(boolean extractInlineImageMetadataOnly) { defaultConfig.setExtractInlineImageMetadataOnly(extractInlineImageMetadataOnly); }  }
PDFParser extends AbstractParser implements Initializable { @Field void setExtractInlineImageMetadataOnly(boolean extractInlineImageMetadataOnly) { defaultConfig.setExtractInlineImageMetadataOnly(extractInlineImageMetadataOnly); }  Set<MediaType> getSupportedTypes(ParseContext context); void parse(
            InputStream stream, ContentHandler handler,
            Metadata metadata, ParseContext context); PDFParserConfig getPDFParserConfig(); void setPDFParserConfig(PDFParserConfig config); boolean getEnableAutoSpace(); @Field void setEnableAutoSpace(boolean v); boolean getExtractAnnotationText(); void setExtractAnnotationText(boolean v); boolean getSuppressDuplicateOverlappingText(); @Field void setSuppressDuplicateOverlappingText(boolean v); boolean getSortByPosition(); @Field void setSortByPosition(boolean v); @Field void setOcrStrategy(String ocrStrategyString); @Field void setOcrImageType(String imageType); void setInitializableProblemHandler(InitializableProblemHandler initializableProblemHandler); @Field void setDropThreshold(float dropThreshold); @Field void setMaxMainMemoryBytes(long maxMainMemoryBytes); @Override void initialize(Map<String, Param> params); @Override void checkInitialization(InitializableProblemHandler handler); }
PDFParser extends AbstractParser implements Initializable { @Field void setExtractInlineImageMetadataOnly(boolean extractInlineImageMetadataOnly) { defaultConfig.setExtractInlineImageMetadataOnly(extractInlineImageMetadataOnly); }  Set<MediaType> getSupportedTypes(ParseContext context); void parse(
            InputStream stream, ContentHandler handler,
            Metadata metadata, ParseContext context); PDFParserConfig getPDFParserConfig(); void setPDFParserConfig(PDFParserConfig config); boolean getEnableAutoSpace(); @Field void setEnableAutoSpace(boolean v); boolean getExtractAnnotationText(); void setExtractAnnotationText(boolean v); boolean getSuppressDuplicateOverlappingText(); @Field void setSuppressDuplicateOverlappingText(boolean v); boolean getSortByPosition(); @Field void setSortByPosition(boolean v); @Field void setOcrStrategy(String ocrStrategyString); @Field void setOcrImageType(String imageType); void setInitializableProblemHandler(InitializableProblemHandler initializableProblemHandler); @Field void setDropThreshold(float dropThreshold); @Field void setMaxMainMemoryBytes(long maxMainMemoryBytes); @Override void initialize(Map<String, Param> params); @Override void checkInitialization(InitializableProblemHandler handler); static final String PASSWORD; }