Top Description Methods
com.openhtmltopdf.pdfboxout

public Interface PageSupplier

Known Direct Implementers
com.openhtmltopdf.pdfboxout.PdfBoxRenderer
Annotations
@FunctionalInterface
Imports
org.apache.pdfbox.pdmodel.PDDocument, .PDPage

The PageSupplier is called whenever a (new) page (or shadow-page) is needed.
With this you can control page-creation (or maybe you want to supply already existing pages).

Quick note on shadow-pages (optional feature):
Shadow-pages would contain overflow content which would otherwise be silently discared, see the OpenHtmlToPdf wiki.

Method Summary

Modifier and TypeMethod and Description
public PDPage

Returns:

PDPage
requestPage
(PDDocument
PDDocument the page belongs to
doc
,
float
Width of page in PDF points (1/72 inch)
pageWidth
,
float
Height of page in PDF points
pageHeight
,
int
Number of the layout page - this may differ from the PDF document page if there are previous shadow pages.
pageNumber
,
int
Number of the shadow-page or -1 if on a main page.
shadowPageNumber
)

Called whenever a page or shadow-page is needed.

Method Detail

requestPageback to summary
public PDPage requestPage(PDDocument doc, float pageWidth, float pageHeight, int pageNumber, int shadowPageNumber)

Called whenever a page or shadow-page is needed.

Parameters
doc:PDDocument

PDDocument the page belongs to

pageWidth:float

Width of page in PDF points (1/72 inch)

pageHeight:float

Height of page in PDF points

pageNumber:int

Number of the layout page - this may differ from the PDF document page if there are previous shadow pages.

shadowPageNumber:int

Number of the shadow-page or -1 if on a main page.

Returns:PDPage

PDPage