| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final float | |
| private static final Log | |
| private final PDPageTree | |
| public static final float | |
| public static final float | |
| private final PDFRenderer | |
| private RenderingHints | |
| private final Scaling | |
| private final boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | PDFPrintable(PDDocument
the document to print document, Scaling page scaling policy scaling)Creates a new PDFPrintable with the given page scaling. |
| public | PDFPrintable(PDDocument
the document to print document, Scaling page scaling policy scaling, boolean true if page borders are to be printed showPageBorder)Creates a new PDFPrintable with the given page scaling and with optional page borders shown. |
| public | PDFPrintable(PDDocument
the document to print document, Scaling page scaling policy scaling, boolean true if page borders are to be printed showPageBorder, float if positive non-zero then the image will be rasterized at the given DPI. If
set to the special value RASTERIZE_DPI_AUTO, the dpi of the printer will be used. dpi)Creates a new PDFPrintable with the given page scaling and with optional page borders shown. |
| public | PDFPrintable(PDDocument
the document to print document, Scaling page scaling policy scaling, boolean true if page borders are to be printed showPageBorder, float if positive non-zero then the image will be rasterized at the given DPI. If
set to the special value RASTERIZE_DPI_AUTO, the dpi of the printer will be used. dpi, boolean true if the content is to be centered on the page (otherwise top-left). center)Creates a new PDFPrintable with the given page scaling and with optional page borders shown. |
| public | PDFPrintable(PDDocument
the document to print document, Scaling page scaling policy scaling, boolean true if page borders are to be printed showPageBorder, float if positive non-zero then the image will be rasterized at the given DPI. If
set to the special value RASTERIZE_DPI_AUTO, the dpi of the printer will be used. dpi, boolean true if the content is to be centered on the page (otherwise top-left). center, PDFRenderer the document renderer. Useful if renderer)PDFRenderer has been subclassed.Creates a new PDFPrintable with the given page scaling and with optional page borders shown. |
| Modifier and Type | Method and Description |
|---|---|
| public RenderingHints | |
| pack-priv static PDRectangle | Returns: The CropBox at this level in the hierarchy.This will find the CropBox with rotation applied, for this page by looking up the hierarchy until it finds them. |
| pack-priv static PDRectangle | Returns: The MediaBox at this level in the hierarchy.This will find the MediaBox with rotation applied, for this page by looking up the hierarchy until it finds them. |
| 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 int | print(Graphics
the context into which the page is drawn graphics, PageFormat the size and orientation of the page being drawn pageFormat, int the zero based index of the page to be drawn pageIndex)Implements java. Prints the page at the specified index into the specified
|
| 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. |
| center | back to summary |
|---|---|
| private final boolean center | |
| dpi | back to summary |
|---|---|
| private final float dpi | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| pageTree | back to summary |
|---|---|
| private final PDPageTree pageTree | |
| RASTERIZE_DPI_AUTO | back to summary |
|---|---|
| public static final float RASTERIZE_DPI_AUTO | |
| RASTERIZE_OFF | back to summary |
|---|---|
| public static final float RASTERIZE_OFF | |
| renderer | back to summary |
|---|---|
| private final PDFRenderer renderer | |
| renderingHints | back to summary |
|---|---|
| private RenderingHints renderingHints | |
| scaling | back to summary |
|---|---|
| private final Scaling scaling | |
| showPageBorder | back to summary |
|---|---|
| private final boolean showPageBorder | |
| subsamplingAllowed | back to summary |
|---|---|
| private boolean subsamplingAllowed | |
| PDFPrintable | back to summary |
|---|---|
| public PDFPrintable(PDDocument document) Creates a new PDFPrintable.
| |
| PDFPrintable | back to summary |
|---|---|
| public PDFPrintable(PDDocument document, Scaling scaling) Creates a new PDFPrintable with the given page scaling.
| |
| PDFPrintable | back to summary |
|---|---|
| public PDFPrintable(PDDocument document, Scaling scaling, boolean showPageBorder) Creates a new PDFPrintable with the given page scaling and with optional page borders shown.
| |
| PDFPrintable | back to summary |
|---|---|
| public PDFPrintable(PDDocument document, Scaling scaling, boolean showPageBorder, float dpi) Creates a new PDFPrintable with the given page scaling and with optional page borders shown. The image will be rasterized at the given DPI before being sent to the printer.
| |
| PDFPrintable | back to summary |
|---|---|
| public PDFPrintable(PDDocument document, Scaling scaling, boolean showPageBorder, float dpi, boolean center) Creates a new PDFPrintable with the given page scaling and with optional page borders shown. The image will be rasterized at the given DPI before being sent to the printer.
| |
| PDFPrintable | back to summary |
|---|---|
| public PDFPrintable(PDDocument document, Scaling scaling, boolean showPageBorder, float dpi, boolean center, PDFRenderer renderer) Creates a new PDFPrintable with the given page scaling and with optional page borders shown. The image will be rasterized at the given DPI before being sent to the printer.
| |
| getRenderingHints | back to summary |
|---|---|
| public RenderingHints getRenderingHints() Get the rendering hints.
| |
| getRotatedCropBox | back to summary |
|---|---|
| pack-priv static PDRectangle getRotatedCropBox(PDPage page) This will find the CropBox with rotation applied, for this page by looking up the hierarchy until it finds them.
| |
| getRotatedMediaBox | back to summary |
|---|---|
| pack-priv static PDRectangle getRotatedMediaBox(PDPage page) This will find the MediaBox with rotation applied, for this page by looking up the hierarchy until it finds them.
| |
| 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.
| |
| back to summary | |
|---|---|
| public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException Implements java. Doc from java. Prints the page at the specified index into the specified
| |
| 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.
| |