Class PDFBoxRenderer
- java.lang.Object
- 
- org.apache.tika.renderer.pdf.pdfbox.PDFBoxRenderer
 
- 
- All Implemented Interfaces:
- Serializable,- Initializable,- PDDocumentRenderer,- Renderer
 
 public class PDFBoxRenderer extends Object implements PDDocumentRenderer, Initializable - See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static org.slf4j.LoggerLOGstatic PropertyPDFBOX_IMAGE_WRITING_TIME_MSThis is the amount of time it takes for PDFBox/java to write the image after it has been rendered into a BufferedImage.static PropertyPDFBOX_RENDERING_TIME_MSThis is the amount of time it takes for PDFBox to render the page to a BufferedImage
 - 
Constructor SummaryConstructors Constructor Description PDFBoxRenderer()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckInitialization(InitializableProblemHandler problemHandler)protected intgetDPI(ParseContext parseContext)protected StringgetImageFormatName(ParseContext parseContext)protected org.apache.pdfbox.rendering.ImageTypegetImageType(ParseContext parseContext)Set<MediaType>getSupportedTypes(ParseContext context)Returns the set of media types supported by this renderer when used with the given parse context.voidinitialize(Map<String,Param> params)RenderResultsrender(InputStream is, Metadata metadata, ParseContext parseContext, RenderRequest... requests)protected RenderResultrenderPage(org.apache.pdfbox.rendering.PDFRenderer renderer, int id, int pageNumber, Metadata metadata, ParseContext parseContext)voidsetDPI(int dpi)voidsetImageFormatName(String imageFormatName)voidsetImageType(org.apache.pdfbox.rendering.ImageType imageType)
 
- 
- 
- 
Field Detail- 
LOGprotected static final org.slf4j.Logger LOG 
 - 
PDFBOX_RENDERING_TIME_MSpublic static Property PDFBOX_RENDERING_TIME_MS This is the amount of time it takes for PDFBox to render the page to a BufferedImage
 - 
PDFBOX_IMAGE_WRITING_TIME_MSpublic static Property PDFBOX_IMAGE_WRITING_TIME_MS This is the amount of time it takes for PDFBox/java to write the image after it has been rendered into a BufferedImage. Some formats take much longer to encode than others.
 
- 
 - 
Method Detail- 
getSupportedTypespublic Set<MediaType> getSupportedTypes(ParseContext context) Description copied from interface:RendererReturns the set of media types supported by this renderer when used with the given parse context.- Specified by:
- getSupportedTypesin interface- Renderer
- Parameters:
- context- parse context
- Returns:
- immutable set of media types
 
 - 
renderpublic RenderResults render(InputStream is, Metadata metadata, ParseContext parseContext, RenderRequest... requests) throws IOException, TikaException - Specified by:
- renderin interface- Renderer
- Throws:
- IOException
- TikaException
 
 - 
renderPageprotected RenderResult renderPage(org.apache.pdfbox.rendering.PDFRenderer renderer, int id, int pageNumber, Metadata metadata, ParseContext parseContext) throws IOException - Throws:
- IOException
 
 - 
initializepublic void initialize(Map<String,Param> params) throws TikaConfigException - Specified by:
- initializein interface- Initializable
- Parameters:
- params- params to use for initialization
- Throws:
- TikaConfigException
 
 - 
checkInitializationpublic void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException - Specified by:
- checkInitializationin interface- Initializable
- Parameters:
- problemHandler- if there is a problem and no custom initializableProblemHandler has been configured via Initializable parameters, this is called to respond.
- Throws:
- TikaConfigException
 
 - 
setDPIpublic void setDPI(int dpi) 
 - 
setImageTypepublic void setImageType(org.apache.pdfbox.rendering.ImageType imageType) 
 - 
setImageFormatNamepublic void setImageFormatName(String imageFormatName) 
 - 
getDPIprotected int getDPI(ParseContext parseContext) 
 - 
getImageTypeprotected org.apache.pdfbox.rendering.ImageType getImageType(ParseContext parseContext) 
 - 
getImageFormatNameprotected String getImageFormatName(ParseContext parseContext) 
 
- 
 
-