NO_SUCH_PAGE, PAGE_EXISTS
Constructor and Description |
---|
PDFPrintable(PDDocument document)
Creates a new PDFPrintable.
|
PDFPrintable(PDDocument document,
Scaling scaling)
Creates a new PDFPrintable with the given page scaling.
|
PDFPrintable(PDDocument document,
Scaling scaling,
boolean showPageBorder)
Creates a new PDFPrintable with the given page scaling and with optional page borders shown.
|
PDFPrintable(PDDocument document,
Scaling scaling,
boolean showPageBorder,
float dpi)
Creates a new PDFPrintable with the given page scaling and with optional page borders shown.
|
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.
|
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.
|
Modifier and Type | Method and Description |
---|---|
RenderingHints |
getRenderingHints()
Get the rendering hints.
|
boolean |
isSubsamplingAllowed()
Value indicating if the renderer is allowed to subsample images before drawing, according to
image dimensions and requested scale.
|
int |
print(Graphics graphics,
PageFormat pageFormat,
int pageIndex) |
void |
setRenderingHints(RenderingHints renderingHints)
Set the rendering hints.
|
void |
setSubsamplingAllowed(boolean subsamplingAllowed)
Sets a value instructing the renderer whether it is allowed to subsample images before
drawing.
|
public PDFPrintable(PDDocument document)
document
- the document to printpublic PDFPrintable(PDDocument document, Scaling scaling)
document
- the document to printscaling
- page scaling policypublic PDFPrintable(PDDocument document, Scaling scaling, boolean showPageBorder)
document
- the document to printscaling
- page scaling policyshowPageBorder
- true if page borders are to be printedpublic PDFPrintable(PDDocument document, Scaling scaling, boolean showPageBorder, float dpi)
document
- the document to printscaling
- page scaling policyshowPageBorder
- true if page borders are to be printeddpi
- if non-zero then the image will be rasterized at the given DPIpublic PDFPrintable(PDDocument document, Scaling scaling, boolean showPageBorder, float dpi, boolean center)
document
- the document to printscaling
- page scaling policyshowPageBorder
- true if page borders are to be printeddpi
- if non-zero then the image will be rasterized at the given DPIcenter
- true if the content is to be centered on the page (otherwise top-left).public PDFPrintable(PDDocument document, Scaling scaling, boolean showPageBorder, float dpi, boolean center, PDFRenderer renderer)
document
- the document to printscaling
- page scaling policyshowPageBorder
- true if page borders are to be printeddpi
- if non-zero then the image will be rasterized at the given DPIcenter
- true if the content is to be centered on the page (otherwise top-left).renderer
- the document renderer. Useful if PDFRenderer
has been subclassed.public boolean isSubsamplingAllowed()
public void setSubsamplingAllowed(boolean subsamplingAllowed)
subsamplingAllowed
- The new value indicating if subsampling is allowed.public RenderingHints getRenderingHints()
public void setRenderingHints(RenderingHints renderingHints)
renderingHints
- public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException
print
in interface Printable
PrinterException
Copyright © 2002–2024 The Apache Software Foundation. All rights reserved.