Class PDFBoxRenderer
java.lang.Object
org.apache.tika.renderer.pdf.pdfbox.PDFBoxRenderer
- All Implemented Interfaces:
Serializable,SelfConfiguring,PDDocumentRenderer,Renderer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.slf4j.Loggerstatic final PropertyThis is the amount of time it takes for PDFBox/java to write the image after it has been rendered into a BufferedImage.static final PropertyThis is the amount of time it takes for PDFBox to render the page to a BufferedImage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSupportedTypes(ParseContext context) Returns the set of media types supported by this renderer when used with the given parse context.static double[]pageSize(org.apache.pdfbox.pdmodel.PDPage page) The size in points of the image PDFBox draws for the page: the crop box, with width and height swapped when the page is rotated a quarter turn.render(TikaInputStream tis, Metadata metadata, ParseContext parseContext, RenderRequest... requests) protected RenderResultrenderPage(org.apache.pdfbox.rendering.PDFRenderer renderer, org.apache.pdfbox.pdmodel.PDPage page, int id, int pageNumber, Metadata metadata, ParseContext parseContext) voidsetDPI(int dpi) Deprecated.voidsetImageFormatName(String imageFormatName) Deprecated.since 4.1.0; seesetDPI(int).voidsetImageQuality(float imageQuality) Deprecated.since 4.1.0; seesetDPI(int).voidsetImageType(org.apache.pdfbox.rendering.ImageType imageType) Deprecated.since 4.1.0; seesetDPI(int).voidsetMaxImagePixels(long maxImagePixels) Deprecated.since 4.1.0; seesetDPI(int).static org.apache.pdfbox.rendering.ImageTypePDFBox's image type for a core one.
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG -
PDFBOX_RENDERING_TIME_MS
This is the amount of time it takes for PDFBox to render the page to a BufferedImage- See Also:
-
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.- See Also:
-
-
Constructor Details
-
PDFBoxRenderer
public PDFBoxRenderer()
-
-
Method Details
-
getSupportedTypes
Description copied from interface:RendererReturns the set of media types supported by this renderer when used with the given parse context.- Specified by:
getSupportedTypesin interfaceRenderer- Parameters:
context- parse context- Returns:
- immutable set of media types
-
toPdfBox
PDFBox's image type for a core one. -
render
public RenderResults render(TikaInputStream tis, Metadata metadata, ParseContext parseContext, RenderRequest... requests) throws IOException, TikaException - Specified by:
renderin interfaceRenderer- Throws:
IOExceptionTikaException
-
pageSize
public static double[] pageSize(org.apache.pdfbox.pdmodel.PDPage page) The size in points of the image PDFBox draws for the page: the crop box, with width and height swapped when the page is rotated a quarter turn. What the box and minimum apply to. -
renderPage
protected RenderResult renderPage(org.apache.pdfbox.rendering.PDFRenderer renderer, org.apache.pdfbox.pdmodel.PDPage page, int id, int pageNumber, Metadata metadata, ParseContext parseContext) throws IOException - Throws:
IOException
-
setDPI
Deprecated.since 4.1.0: applies only to a directrender(org.apache.tika.io.TikaInputStream, org.apache.tika.metadata.Metadata, org.apache.tika.parser.ParseContext, org.apache.tika.renderer.RenderRequest...)call with noRenderSettingsin the context. A parse always scopespages.render, which replaces every value set here. Configure"pages": {"render": {...}}, or set aRenderSettingson the context when calling the renderer yourself. -
setImageType
Deprecated.since 4.1.0; seesetDPI(int). -
setImageFormatName
Deprecated.since 4.1.0; seesetDPI(int). -
setImageQuality
Deprecated.since 4.1.0; seesetDPI(int). -
setMaxImagePixels
Deprecated.since 4.1.0; seesetDPI(int).
-
render(org.apache.tika.io.TikaInputStream, org.apache.tika.metadata.Metadata, org.apache.tika.parser.ParseContext, org.apache.tika.renderer.RenderRequest...)call with noRenderSettingsin the context.