java.awt.print.Printablepublic final class PDFPrintable
extends java.lang.Object
implements java.awt.print.Printable
| Constructor | 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.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex) |
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).Copyright © 2002–2018. All rights reserved.