public class PDFParser
extends org.apache.tika.parser.AbstractParser
This parser can process also encrypted PDF documents if the required
password is given as a part of the input metadata associated with a
document. If no password is given, then this parser will try decrypting
the document using the empty password that's often used with PDFs. If
the PDF contains any embedded documents (for example as part of a PDF
package) then this parser will use the 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).
| 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 |
|---|---|
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.
|
boolean |
getUseNonSequentialParser()
Deprecated.
|
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 |
setPDFParserConfig(PDFParserConfig config) |
void |
setSortByPosition(boolean v)
Deprecated.
|
void |
setSuppressDuplicateOverlappingText(boolean v)
Deprecated.
|
void |
setUseNonSequentialParser(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)
public 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
IOExceptionSAXExceptionorg.apache.tika.exception.TikaExceptionpublic void setPDFParserConfig(PDFParserConfig config)
public PDFParserConfig getPDFParserConfig()
public void setUseNonSequentialParser(boolean v)
setPDFParserConfig(PDFParserConfig)public boolean getUseNonSequentialParser()
getPDFParserConfig()setUseNonSequentialParser(boolean)public void setEnableAutoSpace(boolean v)
setPDFParserConfig(PDFParserConfig)public boolean getEnableAutoSpace()
getPDFParserConfig()setEnableAutoSpace(boolean)public void setExtractAnnotationText(boolean v)
setPDFParserConfig(PDFParserConfig)public boolean getExtractAnnotationText()
getPDFParserConfig()public void setSuppressDuplicateOverlappingText(boolean v)
setPDFParserConfig(PDFParserConfig)public boolean getSuppressDuplicateOverlappingText()
getPDFParserConfig()public void setSortByPosition(boolean v)
setPDFParserConfig(PDFParserConfig)public boolean getSortByPosition()
getPDFParserConfig()setSortByPosition(boolean)Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.