public class PDFBoxRenderer extends Object implements PDDocumentRenderer, Initializable
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG |
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
to a BufferedImage
|
| Constructor and Description |
|---|
PDFBoxRenderer() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkInitialization(InitializableProblemHandler problemHandler) |
protected int |
getDPI(ParseContext parseContext) |
protected String |
getImageFormatName(ParseContext parseContext) |
protected org.apache.pdfbox.rendering.ImageType |
getImageType(ParseContext parseContext) |
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,
ParseContext parseContext) |
void |
setDPI(int dpi) |
void |
setImageFormatName(String imageFormatName) |
void |
setImageType(org.apache.pdfbox.rendering.ImageType imageType) |
protected static final org.slf4j.Logger LOG
public static Property PDFBOX_RENDERING_TIME_MS
public static Property PDFBOX_IMAGE_WRITING_TIME_MS
public Set<MediaType> getSupportedTypes(ParseContext context)
RenderergetSupportedTypes in interface Renderercontext - parse contextpublic RenderResults render(InputStream is, Metadata metadata, ParseContext parseContext, RenderRequest... requests) throws IOException, TikaException
render in interface RendererIOExceptionTikaExceptionprotected RenderResult renderPage(org.apache.pdfbox.rendering.PDFRenderer renderer, int id, int pageNumber, Metadata metadata, ParseContext parseContext) throws IOException
IOExceptionpublic void initialize(Map<String,Param> params) throws TikaConfigException
initialize in interface Initializableparams - params to use for initializationTikaConfigExceptionpublic void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException
checkInitialization in interface InitializableproblemHandler - if there is a problem and no
custom initializableProblemHandler has been configured
via Initializable parameters,
this is called to respond.TikaConfigExceptionpublic void setDPI(int dpi)
public void setImageType(org.apache.pdfbox.rendering.ImageType imageType)
public void setImageFormatName(String imageFormatName)
protected int getDPI(ParseContext parseContext)
protected org.apache.pdfbox.rendering.ImageType getImageType(ParseContext parseContext)
protected String getImageFormatName(ParseContext parseContext)
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.