public class PDFParser
extends org.apache.tika.parser.AbstractParser
implements org.apache.tika.config.Initializable
EmbeddedDocumentExtractor
to handle them.
As of Tika 1.6, it is possible to extract inline images with
the EmbeddedDocumentExtractor as if they were regular
attachments. By default, this feature is turned off because of
the potentially enormous number and size of inline images. To
turn this feature on, see
PDFParserConfig.setExtractInlineImages(boolean).
Please note that tables are not stored as entities within PDFs. It
takes significant computation to identify and then correctly extract
tables from PDFs. As of this writing, the PDFParser extracts
text within tables, but it does not compute table cell boundaries or
table row boundaries. Please see
tabula for one project that
tries to maintain the structure of tables represented in PDFs.| Modifier and Type | Field and Description |
|---|---|
static String |
PASSWORD
Deprecated.
Supply a
PasswordProvider on the ParseContext instead |
| Constructor and Description |
|---|
PDFParser() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkInitialization(org.apache.tika.config.InitializableProblemHandler handler) |
boolean |
getEnableAutoSpace()
Deprecated.
|
boolean |
getExtractAnnotationText()
Deprecated.
|
PDFParserConfig |
getPDFParserConfig() |
boolean |
getSortByPosition()
Deprecated.
|
Set<org.apache.tika.mime.MediaType> |
getSupportedTypes(org.apache.tika.parser.ParseContext context) |
boolean |
getSuppressDuplicateOverlappingText()
Deprecated.
|
void |
initialize(Map<String,org.apache.tika.config.Param> params)
This is a no-op.
|
void |
parse(InputStream stream,
ContentHandler handler,
org.apache.tika.metadata.Metadata metadata,
org.apache.tika.parser.ParseContext context) |
void |
setEnableAutoSpace(boolean v)
Deprecated.
|
void |
setExtractAnnotationText(boolean v)
Deprecated.
|
void |
setInitializableProblemHandler(org.apache.tika.config.InitializableProblemHandler initializableProblemHandler) |
void |
setOcrImageType(String imageType) |
void |
setOcrStrategy(String ocrStrategyString) |
void |
setPDFParserConfig(PDFParserConfig config) |
void |
setSortByPosition(boolean v)
Deprecated.
|
void |
setSuppressDuplicateOverlappingText(boolean v)
Deprecated.
|
public static final String PASSWORD
PasswordProvider on the ParseContext insteadpublic Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext context)
getSupportedTypes in interface org.apache.tika.parser.Parserpublic void parse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context) throws IOException, SAXException, org.apache.tika.exception.TikaException
parse in interface org.apache.tika.parser.ParserIOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionpublic PDFParserConfig getPDFParserConfig()
public void setPDFParserConfig(PDFParserConfig config)
public boolean getEnableAutoSpace()
getPDFParserConfig()setEnableAutoSpace(boolean)public void setEnableAutoSpace(boolean v)
setPDFParserConfig(PDFParserConfig)public boolean getExtractAnnotationText()
getPDFParserConfig()public void setExtractAnnotationText(boolean v)
setPDFParserConfig(PDFParserConfig)public boolean getSuppressDuplicateOverlappingText()
getPDFParserConfig()public void setSuppressDuplicateOverlappingText(boolean v)
setPDFParserConfig(PDFParserConfig)public boolean getSortByPosition()
getPDFParserConfig()setSortByPosition(boolean)@Field public void setSortByPosition(boolean v)
setPDFParserConfig(PDFParserConfig)@Field public void setOcrStrategy(String ocrStrategyString)
@Field public void setOcrImageType(String imageType)
public void setInitializableProblemHandler(org.apache.tika.config.InitializableProblemHandler initializableProblemHandler)
public void initialize(Map<String,org.apache.tika.config.Param> params) throws org.apache.tika.exception.TikaConfigException
initialize in interface org.apache.tika.config.Initializableparams - params to use for initializationorg.apache.tika.exception.TikaConfigExceptionpublic void checkInitialization(org.apache.tika.config.InitializableProblemHandler handler)
throws org.apache.tika.exception.TikaConfigException
checkInitialization in interface org.apache.tika.config.Initializableorg.apache.tika.exception.TikaConfigExceptionCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.