| Modifier and Type | Class and Description |
|---|---|
| public static enum | PdfRendererBuilder.
List of caches available. |
| public static enum | PdfRendererBuilder.
Various level of PDF/A conformance: PDF/A-1, PDF/A-2 and PDF/A-3 |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PdfBoxRenderer | |
| public PdfBoxRenderer | |
| public void | |
| public PdfRendererBuilder | |
| public PdfRendererBuilder | Returns: this for method chaining.Use a specific cache. |
| public PdfRendererBuilder | |
| public PdfRendererBuilder | useFont(PDFontSupplier supplier, String fontFamily, Integer fontWeight, BaseRendererBuilder.
Like |
| public PdfRendererBuilder | useFont(PDFontSupplier supplier, String fontFamily)
Simpler overload for
|
| public PdfRendererBuilder | Returns: this for method chaining.PageSupplier to useSet a PageSupplier that is called whenever a new page is needed. |
| public PdfRendererBuilder | Returns: this for method chaininga (usually empty) PDDocument doc)By default, this project creates an entirely in-memory |
| public PdfRendererBuilder | usePdfAConformance(PdfRendererBuilder.
Set the PDF/A conformance, typically we use PDF/A-1 Note: PDF/A documents require fonts to be embedded. |
| public PdfRendererBuilder | Returns: this for method chainingWhether to conform to PDF/UA or Accessible PDF. |
| public PdfRendererBuilder | |
| public PdfRendererBuilder | Returns: this for method chaining.
Deprecated
Fast mode is the default from version 1.0.5. |
| public PdfRendererBuilder | Returns: this for method chainingthe name of the producer to set defaults to openhtmltopdf.com producer)Set a producer on the output document |
| PdfRendererBuilder | back to summary |
|---|---|
| public PdfRendererBuilder() | |
| buildPdfRenderer | back to summary |
|---|---|
| public PdfBoxRenderer buildPdfRenderer() Build a PdfBoxRenderer for further customization. Remember to call
| |
| buildPdfRenderer | back to summary |
|---|---|
| public PdfBoxRenderer buildPdfRenderer(Closeable diagnosticConsumer) | |
| run | back to summary |
|---|---|
| public void run() throws IOException Run the XHTML/XML to PDF conversion and output to an output stream set by toStream. | |
| toStream | back to summary |
|---|---|
| public PdfRendererBuilder toStream(OutputStream out) An output stream to output the resulting PDF. The caller is required to close the output stream after calling run. | |
| useCacheStore | back to summary |
|---|---|
| public PdfRendererBuilder useCacheStore(PdfRendererBuilder. Use a specific cache. Cache values should be thread safe, so provided your cache store itself is thread safe can be used accross threads.
| |
| useColorProfile | back to summary |
|---|---|
| public PdfRendererBuilder useColorProfile(byte[] colorProfile) Sets the color profile, needed for PDF/A conformance. You can use the sRGB.icc from https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/resources/org/apache/pdfbox/resources/pdfa/ | |
| useFont | back to summary |
|---|---|
| public PdfRendererBuilder useFont(PDFontSupplier supplier, String fontFamily, Integer fontWeight, BaseRendererBuilder. Like | |
| useFont | back to summary |
|---|---|
| public PdfRendererBuilder useFont(PDFontSupplier supplier, String fontFamily) Simpler overload for
| |
| usePageSupplier | back to summary |
|---|---|
| public PdfRendererBuilder usePageSupplier(PageSupplier pageSupplier) Set a PageSupplier that is called whenever a new page is needed.
| |
| usePDDocument | back to summary |
|---|---|
| public PdfRendererBuilder usePDDocument(PDDocument doc) By default, this project creates an entirely in-memory
| |
| usePdfAConformance | back to summary |
|---|---|
| public PdfRendererBuilder usePdfAConformance(PdfRendererBuilder. Set the PDF/A conformance, typically we use PDF/A-1 Note: PDF/A documents require fonts to be embedded. So if this is not set to NONE, the built-in fonts will not be available and currently any text without a specified and embedded font will cause the renderer to crash with an exception. | |
| usePdfUaAccessbility | back to summary |
|---|---|
| public PdfRendererBuilder usePdfUaAccessbility(boolean pdfUaAccessibility) Whether to conform to PDF/UA or Accessible PDF. False by default.
| |
| usePdfVersion | back to summary |
|---|---|
| public PdfRendererBuilder usePdfVersion(float version) Set the PDF version, typically we use 1.7. If you set a lower version, it is your responsibility to make sure no more recent PDF features are used. | |
| useSlowMode | back to summary |
|---|---|
| public PdfRendererBuilder useSlowMode()
Deprecated
Fast mode is the default from version 1.0.5. You can call this temporary method to use the slow renderer until it is removed in a near future version. This method is marked deprecated to prompt you to upgrade to the fast renderer.
| |
| withProducer | back to summary |
|---|---|
| public PdfRendererBuilder withProducer(String producer) Set a producer on the output document
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final PdfRendererBuilder. | PDF_FONT_METRICS
Caches font metrics, based on a combined key of family name, weight and style. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static PdfRendererBuilder. | |
| public static PdfRendererBuilder. |
| PDF_FONT_METRICS | back to summary |
|---|---|
| public static final PdfRendererBuilder. Caches font metrics, based on a combined key of family name, weight and style. Using this cache avoids loading fallback fonts if the metrics are already in the cache and the previous fonts contain the needed characters. | |
| CacheStore | back to summary |
|---|---|
| private CacheStore() | |
| valueOf | back to summary |
|---|---|
| public static PdfRendererBuilder. | |
| values | back to summary |
|---|---|
| public static PdfRendererBuilder. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final PdfRendererBuilder. | |
| private final int | |
| public static final PdfRendererBuilder. | |
| public static final PdfRendererBuilder. | |
| public static final PdfRendererBuilder. | |
| public static final PdfRendererBuilder. | |
| public static final PdfRendererBuilder. | |
| public static final PdfRendererBuilder. | |
| public static final PdfRendererBuilder. | |
| public static final PdfRendererBuilder. | |
| private final float | |
| private final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public int | |
| public float | |
| public static PdfRendererBuilder. | |
| public static PdfRendererBuilder. |
| NONE | back to summary |
|---|---|
| public static final PdfRendererBuilder. | |
| part | back to summary |
|---|---|
| private final int part | |
| PDFA_1_A | back to summary |
|---|---|
| public static final PdfRendererBuilder. | |
| PDFA_1_B | back to summary |
|---|---|
| public static final PdfRendererBuilder. | |
| PDFA_2_A | back to summary |
|---|---|
| public static final PdfRendererBuilder. | |
| PDFA_2_B | back to summary |
|---|---|
| public static final PdfRendererBuilder. | |
| PDFA_2_U | back to summary |
|---|---|
| public static final PdfRendererBuilder. | |
| PDFA_3_A | back to summary |
|---|---|
| public static final PdfRendererBuilder. | |
| PDFA_3_B | back to summary |
|---|---|
| public static final PdfRendererBuilder. | |
| PDFA_3_U | back to summary |
|---|---|
| public static final PdfRendererBuilder. | |
| pdfVersion | back to summary |
|---|---|
| private final float pdfVersion | |
| value | back to summary |
|---|---|
| private final String value | |
| PdfAConformance | back to summary |
|---|---|
| private PdfAConformance(int part, String value, float pdfVersion) | |
| getConformanceValue | back to summary |
|---|---|
| public String getConformanceValue() | |
| getPart | back to summary |
|---|---|
| public int getPart() | |
| getPdfVersion | back to summary |
|---|---|
| public float getPdfVersion() | |
| valueOf | back to summary |
|---|---|
| public static PdfRendererBuilder. | |
| values | back to summary |
|---|---|
| public static PdfRendererBuilder. | |