UNKNOWN_NUMBER_OF_PAGES
Constructor and Description |
---|
PDFPageable(PDDocument document)
Creates a new PDFPageable.
|
PDFPageable(PDDocument document,
Orientation orientation)
Creates a new PDFPageable with the given page orientation.
|
PDFPageable(PDDocument document,
Orientation orientation,
boolean showPageBorder)
Creates a new PDFPageable with the given page orientation and with optional page borders
shown.
|
PDFPageable(PDDocument document,
Orientation orientation,
boolean showPageBorder,
float dpi)
Creates a new PDFPageable with the given page orientation and with optional page borders
shown.
|
Modifier and Type | Method and Description |
---|---|
int |
getNumberOfPages() |
PageFormat |
getPageFormat(int pageIndex)
Returns the actual physical size of the pages in the PDF file.
|
Printable |
getPrintable(int i) |
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.
|
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 PDFPageable(PDDocument document)
document
- the document to printpublic PDFPageable(PDDocument document, Orientation orientation)
document
- the document to printorientation
- page orientation policypublic PDFPageable(PDDocument document, Orientation orientation, boolean showPageBorder)
document
- the document to printorientation
- page orientation policyshowPageBorder
- true if page borders are to be printedpublic PDFPageable(PDDocument document, Orientation orientation, boolean showPageBorder, float dpi)
document
- the document to printorientation
- page orientation policyshowPageBorder
- true if page borders are to be printeddpi
- if non-zero then the image will be rasterized at the given DPIpublic RenderingHints getRenderingHints()
public void setRenderingHints(RenderingHints renderingHints)
renderingHints
- public boolean isSubsamplingAllowed()
public void setSubsamplingAllowed(boolean subsamplingAllowed)
subsamplingAllowed
- The new value indicating if subsampling is allowed.public int getNumberOfPages()
getNumberOfPages
in interface Pageable
getNumberOfPages
in class Book
public PageFormat getPageFormat(int pageIndex)
getPageFormat
in interface Pageable
getPageFormat
in class Book
public Printable getPrintable(int i)
getPrintable
in interface Pageable
getPrintable
in class Book
Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.