| Modifier and Type | Field and Description |
|---|---|
| private AnnotationFilter | annotationFilter
Default annotations filter, returns all annotations |
| private RenderDestination | |
| protected final PDDocument | |
| private float | |
| private BufferedImage | |
| private final PDPageTree | |
| private RenderingHints | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private RenderingHints | |
| protected PageDrawer | Returns: a new PageDrawer instanceparameters to be used when creating the PageDrawer instance parameters)Returns a new PageDrawer instance, using the given parameters. |
| public AnnotationFilter | |
| public RenderDestination | |
| public float | Returns: get the image downscaling optimization threshold. SeegetImageDownscalingOptimizationThreshold() for details.
|
| pack-priv BufferedImage | |
| public RenderingHints | |
| private boolean | |
| private boolean | |
| public boolean | Returns: true if the group is enabledthe group group)Indicates whether an optional content group is enabled. |
| public boolean | Returns: true if subsampling of images is allowed, false otherwise.Value indicating if the renderer is allowed to subsample images before drawing, according to image dimensions and requested scale. |
| public BufferedImage | Returns: the rendered page imagethe zero-based index of the page to be converted. pageIndex)Returns the given page as an RGB image at 72 DPI |
| public BufferedImage | Returns: the rendered page imagethe zero-based index of the page to be converted pageIndex, float the scaling factor, where 1 = 72 DPI scale)Returns the given page as an RGB image at the given scale. |
| public BufferedImage | Returns: the rendered page imagethe zero-based index of the page to be converted pageIndex, float the scaling factor, where 1 = 72 DPI scale, ImageType the type of image to return imageType)Returns the given page as an RGB or ARGB image at the given scale. |
| public BufferedImage | Returns: the rendered page imagethe zero-based index of the page to be converted pageIndex, float the scaling factor, where 1 = 72 DPI scale, ImageType the type of image to return imageType, RenderDestination controlling visibility of optional content groups destination)Returns the given page as an RGB or ARGB image at the given scale. |
| public BufferedImage | Returns: the rendered page imagethe zero-based index of the page to be converted pageIndex, float the DPI (dots per inch) to render at dpi)Returns the given page as an RGB image at the given DPI. |
| public BufferedImage | Returns: the rendered page imagethe zero-based index of the page to be converted pageIndex, float the DPI (dots per inch) to render at dpi, ImageType the type of image to return imageType)Returns the given page as an RGB image at the given DPI. |
| public void | renderPageToGraphics(int
the zero-based index of the page to be converted pageIndex, Graphics2D the Graphics2D on which to draw the page graphics)Renders a given page to an AWT Graphics2D instance at 72 DPI. |
| public void | renderPageToGraphics(int
the zero-based index of the page to be converted pageIndex, Graphics2D the Graphics2D on which to draw the page graphics, float the scaling factor, where 1 = 72 DPI scale)Renders a given page to an AWT Graphics2D instance. |
| public void | renderPageToGraphics(int
the zero-based index of the page to be converted pageIndex, Graphics2D the Graphics2D on which to draw the page graphics, float the scale to draw the page at for the x-axis, where 1 = 72 DPI scaleX, float the scale to draw the page at for the y-axis, where 1 = 72 DPI scaleY)Renders a given page to an AWT Graphics2D instance. |
| public void | renderPageToGraphics(int
the zero-based index of the page to be converted pageIndex, Graphics2D the Graphics2D on which to draw the page graphics, float the scale to draw the page at for the x-axis, where 1 = 72 DPI scaleX, float the scale to draw the page at for the y-axis, where 1 = 72 DPI scaleY, RenderDestination controlling visibility of optional content groups destination)Renders a given page to an AWT Graphics2D instance. |
| public void | setAnnotationsFilter(AnnotationFilter
the AnnotationFilter annotationsFilter)Set the AnnotationFilter. |
| public void | |
| public void | setImageDownscalingOptimizationThreshold(float
image downscaling optimization threshold imageDownscalingOptimizationThreshold)Set the image downscaling optimization threshold. |
| public void | setRenderingHints(RenderingHints
rendering hints to be used to influence rendering quality and speed renderingHints)Set the rendering hints. |
| public void | setSubsamplingAllowed(boolean
The new value indicating if subsampling is allowed. subsamplingAllowed)Sets a value instructing the renderer whether it is allowed to subsample images before drawing. |
| private void |
| annotationFilter | back to summary |
|---|---|
| private AnnotationFilter annotationFilter Default annotations filter, returns all annotations | |
| defaultDestination | back to summary |
|---|---|
| private RenderDestination defaultDestination | |
| document | back to summary |
|---|---|
| protected final PDDocument document | |
| imageDownscalingOptimizationThreshold | back to summary |
|---|---|
| private float imageDownscalingOptimizationThreshold | |
| pageImage | back to summary |
|---|---|
| private BufferedImage pageImage | |
| pageTree | back to summary |
|---|---|
| private final PDPageTree pageTree | |
| renderingHints | back to summary |
|---|---|
| private RenderingHints renderingHints | |
| subsamplingAllowed | back to summary |
|---|---|
| private boolean subsamplingAllowed | |
| PDFRenderer | back to summary |
|---|---|
| public PDFRenderer(PDDocument document) Creates a new PDFRenderer.
| |
| createDefaultRenderingHints | back to summary |
|---|---|
| private RenderingHints createDefaultRenderingHints(Graphics2D graphics) | |
| createPageDrawer | back to summary |
|---|---|
| protected PageDrawer createPageDrawer(PageDrawerParameters parameters) throws IOException Returns a new PageDrawer instance, using the given parameters. May be overridden.
| |
| getAnnotationsFilter | back to summary |
|---|---|
| public AnnotationFilter getAnnotationsFilter() Return the AnnotationFilter.
| |
| getDefaultDestination | back to summary |
|---|---|
public RenderDestination getDefaultDestination()
| |
| getImageDownscalingOptimizationThreshold | back to summary |
|---|---|
public float getImageDownscalingOptimizationThreshold()
| |
| getPageImage | back to summary |
|---|---|
| pack-priv BufferedImage getPageImage() Returns the image to which the current page is being rendered. May be null if the page is rendered to a Graphics2D object instead of a BufferedImage. | |
| getRenderingHints | back to summary |
|---|---|
| public RenderingHints getRenderingHints() Get the rendering hints.
| |
| hasBlendMode | back to summary |
|---|---|
| private boolean hasBlendMode(PDPage page) | |
| isBitonal | back to summary |
|---|---|
| private boolean isBitonal(Graphics2D graphics) | |
| isGroupEnabled | back to summary |
|---|---|
| public boolean isGroupEnabled(PDOptionalContentGroup group) Indicates whether an optional content group is enabled.
| |
| isSubsamplingAllowed | back to summary |
|---|---|
| public boolean isSubsamplingAllowed() Value indicating if the renderer is allowed to subsample images before drawing, according to image dimensions and requested scale. Subsampling may be faster and less memory-intensive in some cases, but it may also lead to loss of quality, especially in images with high spatial frequency.
| |
| renderImage | back to summary |
|---|---|
| public BufferedImage renderImage(int pageIndex) throws IOException Returns the given page as an RGB image at 72 DPI
| |
| renderImage | back to summary |
|---|---|
| public BufferedImage renderImage(int pageIndex, float scale) throws IOException Returns the given page as an RGB image at the given scale. A scale of 1 will render at 72 DPI.
| |
| renderImage | back to summary |
|---|---|
| public BufferedImage renderImage(int pageIndex, float scale, ImageType imageType) throws IOException Returns the given page as an RGB or ARGB image at the given scale.
| |
| renderImage | back to summary |
|---|---|
| public BufferedImage renderImage(int pageIndex, float scale, ImageType imageType, RenderDestination destination) throws IOException Returns the given page as an RGB or ARGB image at the given scale.
| |
| renderImageWithDPI | back to summary |
|---|---|
| public BufferedImage renderImageWithDPI(int pageIndex, float dpi) throws IOException Returns the given page as an RGB image at the given DPI.
| |
| renderImageWithDPI | back to summary |
|---|---|
| public BufferedImage renderImageWithDPI(int pageIndex, float dpi, ImageType imageType) throws IOException Returns the given page as an RGB image at the given DPI.
| |
| renderPageToGraphics | back to summary |
|---|---|
| public void renderPageToGraphics(int pageIndex, Graphics2D graphics) throws IOException Renders a given page to an AWT Graphics2D instance at 72 DPI.
Read
| |
| renderPageToGraphics | back to summary |
|---|---|
| public void renderPageToGraphics(int pageIndex, Graphics2D graphics, float scale) throws IOException Renders a given page to an AWT Graphics2D instance.
Read
| |
| renderPageToGraphics | back to summary |
|---|---|
| public void renderPageToGraphics(int pageIndex, Graphics2D graphics, float scaleX, float scaleY) throws IOException Renders a given page to an AWT Graphics2D instance.
Read
| |
| renderPageToGraphics | back to summary |
|---|---|
| public void renderPageToGraphics(int pageIndex, Graphics2D graphics, float scaleX, float scaleY, RenderDestination destination) throws IOException Renders a given page to an AWT Graphics2D instance. Known problems:
renderImage methods.
| |
| setAnnotationsFilter | back to summary |
|---|---|
| public void setAnnotationsFilter(AnnotationFilter annotationsFilter) Set the AnnotationFilter. Allows to only render annotation accepted by the filter.
| |
| setDefaultDestination | back to summary |
|---|---|
public void setDefaultDestination(RenderDestination defaultDestination)
| |
| setImageDownscalingOptimizationThreshold | back to summary |
|---|---|
| public void setImageDownscalingOptimizationThreshold(float imageDownscalingOptimizationThreshold) Set the image downscaling optimization threshold. This must be a value between 0 and 1. When rendering downscaled images and rendering hints are set to bicubic+quality and the scaling is smaller than the threshold, a more quality-optimized but slower method will be used. The default is 0.5 which is a good compromise.
| |
| setRenderingHints | back to summary |
|---|---|
| public void setRenderingHints(RenderingHints renderingHints) Set the rendering hints. Use this to influence rendering quality and speed. If you don't set them yourself or pass null, PDFBox will decide at runtime depending on the destination.
| |
| setSubsamplingAllowed | back to summary |
|---|---|
| public void setSubsamplingAllowed(boolean subsamplingAllowed) Sets a value instructing the renderer whether it is allowed to subsample images before drawing. The subsampling frequency is determined according to image size and requested scale. Subsampling may be faster and less memory-intensive in some cases, but it may also lead to loss of quality, especially in images with high spatial frequency.
| |
| transform | back to summary |
|---|---|
| private void transform(Graphics2D graphics, int rotationAngle, PDRectangle cropBox, float scaleX, float scaleY) | |