public class PDFBoxRenderer extends Object implements PDDocumentRenderer, Initializable
Modifier and Type | Field and Description |
---|---|
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.
|
static Property |
PDFBOX_RENDERING_TIME_MS
This is the amount of time it takes for PDFBox to render the page
|
Constructor and Description |
---|
PDFBoxRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
checkInitialization(InitializableProblemHandler problemHandler) |
Set<MediaType> |
getSupportedTypes(ParseContext context)
Returns the set of media types supported by this renderer when used
with the given parse context.
|
void |
initialize(Map<String,Param> params) |
RenderResults |
render(InputStream is,
Metadata metadata,
ParseContext parseContext,
RenderRequest... requests) |
protected RenderResult |
renderPage(org.apache.pdfbox.rendering.PDFRenderer renderer,
int id,
int pageNumber,
Metadata metadata) |
void |
setDPI(int dpi) |
void |
setImageFormatName(String imageFormatName) |
void |
setImageType(org.apache.pdfbox.rendering.ImageType imageType) |
public static Property PDFBOX_RENDERING_TIME_MS
public static Property PDFBOX_IMAGE_WRITING_TIME_MS
public Set<MediaType> getSupportedTypes(ParseContext context)
Renderer
getSupportedTypes
in interface Renderer
context
- parse contextpublic RenderResults render(InputStream is, Metadata metadata, ParseContext parseContext, RenderRequest... requests) throws IOException, TikaException
render
in interface Renderer
IOException
TikaException
protected RenderResult renderPage(org.apache.pdfbox.rendering.PDFRenderer renderer, int id, int pageNumber, Metadata metadata) throws IOException
IOException
public void initialize(Map<String,Param> params) throws TikaConfigException
initialize
in interface Initializable
params
- params to use for initializationTikaConfigException
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException
checkInitialization
in interface Initializable
problemHandler
- if there is a problem and no
custom initializableProblemHandler has been configured
via Initializable parameters,
this is called to respond.TikaConfigException
public void setDPI(int dpi)
public void setImageType(org.apache.pdfbox.rendering.ImageType imageType)
public void setImageFormatName(String imageFormatName)
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.