Package com.openhtmltopdf.pdfboxout
Interface PageSupplier
-
- All Known Implementing Classes:
PdfBoxRenderer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface PageSupplier
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.pdfbox.pdmodel.PDPage
requestPage(org.apache.pdfbox.pdmodel.PDDocument doc, float pageWidth, float pageHeight, int pageNumber, int shadowPageNumber)
Called whenever a page or shadow-page is needed.
-
-
-
Method Detail
-
requestPage
org.apache.pdfbox.pdmodel.PDPage requestPage(org.apache.pdfbox.pdmodel.PDDocument doc, float pageWidth, float pageHeight, int pageNumber, int shadowPageNumber)
Called whenever a page or shadow-page is needed.- Parameters:
doc
-PDDocument
the page belongs topageWidth
- Width of page in PDF points (1/72 inch)pageHeight
- Height of page in PDF pointspageNumber
- Number of the layout page - this may differ from the PDF document page if there are previous shadow pages.shadowPageNumber
- Number of the shadow-page or -1 if on a main page.- Returns:
PDPage
-
-