public abstract class BaseRendererBuilder<TFinalClass extends BaseRendererBuilder> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseRendererBuilder.FontStyle |
static class |
BaseRendererBuilder.PageSizeUnits |
static class |
BaseRendererBuilder.TextDirection |
| Constructor and Description |
|---|
BaseRendererBuilder() |
| Modifier and Type | Method and Description |
|---|---|
TFinalClass |
addDOMMutator(FSDOMMutator domMutator)
Add a DOM mutator to this builder.
|
TFinalClass |
defaultTextDirection(BaseRendererBuilder.TextDirection textDirection)
The default text direction of the document.
|
TFinalClass |
testMode(boolean mode)
Whether to use test mode and output the PDF uncompressed.
|
TFinalClass |
useCache(FSCache cache)
Provides an external cache which can choose to cache items between runs, such
as fonts or logo images.
|
TFinalClass |
useDefaultPageSize(float pageWidth,
float pageHeight,
BaseRendererBuilder.PageSizeUnits units)
Specifies the default page size to use if none is specified in CSS.
|
TFinalClass |
useDocumentBuilderFactoryImplementationClass(String documentBuilderFactoryClass)
This method should be considered advanced and is not required for most
setups.
|
TFinalClass |
useHttpStreamImplementation(HttpStreamFactory factory)
Provides an HttpStreamFactory implementation if the user desires to use an
external HTTP/HTTPS implementation.
|
TFinalClass |
useMathMLDrawer(SVGDrawer mathMlImpl)
Use the specified MathML implementation.
|
TFinalClass |
useObjectDrawerFactory(FSObjectDrawerFactory objectDrawerFactory)
Set a factory for <object> drawers
|
TFinalClass |
useReplacementText(String replacement)
The replacement text to use if a character is cannot be renderered by any of
the specified fonts.
|
TFinalClass |
useSVGDrawer(SVGDrawer svgImpl)
Uses the specified SVG drawer implementation.
|
TFinalClass |
useTransformerFactoryImplementationClass(String transformerFactoryClass)
This method should be considered advanced and is not required for most
setups.
|
TFinalClass |
useUnicodeBidiReorderer(BidiReorderer reorderer)
Provides a reorderer to properly reverse RTL text.
|
TFinalClass |
useUnicodeBidiSplitter(BidiSplitterFactory splitter)
Provides a text splitter to split text into directional runs.
|
TFinalClass |
useUnicodeCharacterBreaker(FSTextBreaker breaker)
Specify the character breaker.
|
TFinalClass |
useUnicodeLineBreaker(FSTextBreaker breaker)
Specify the line breaker.
|
TFinalClass |
useUnicodeToLowerTransformer(FSTextTransformer tr)
Specify a transformer to use to lower case strings.
|
TFinalClass |
useUnicodeToTitleTransformer(FSTextTransformer tr)
Specify a transformer to title case strings.
|
TFinalClass |
useUnicodeToUpperTransformer(FSTextTransformer tr)
Specify a transformer to use to upper case strings.
|
TFinalClass |
useUriResolver(FSUriResolver resolver)
Provides a uri resolver to resolve relative uris or private uri schemes.
|
TFinalClass |
withFile(File file)
Provides a file to convert to PDF.
|
TFinalClass |
withHtmlContent(String html,
String baseUri)
Provides a string containing XHTML/XML to convert to PDF.
|
TFinalClass |
withUri(String uri)
Provides a URI to convert to PDF.
|
TFinalClass |
withW3cDocument(Document doc,
String baseUri)
Provides a w3c DOM Document acquired from an external source.
|
public static final float PAGE_SIZE_LETTER_WIDTH
public static final float PAGE_SIZE_LETTER_HEIGHT
public static final BaseRendererBuilder.PageSizeUnits PAGE_SIZE_LETTER_UNITS
protected final List<FSDOMMutator> _domMutators
protected HttpStreamFactory _httpStreamFactory
protected FSCache _cache
protected FSUriResolver _resolver
protected String _html
protected String _baseUri
protected Document _document
protected SVGDrawer _svgImpl
protected SVGDrawer _mathmlImpl
protected String _replacementText
protected FSTextBreaker _lineBreaker
protected FSTextBreaker _charBreaker
protected FSTextTransformer _unicodeToUpperTransformer
protected FSTextTransformer _unicodeToLowerTransformer
protected FSTextTransformer _unicodeToTitleTransformer
protected BidiSplitterFactory _splitter
protected BidiReorderer _reorderer
protected boolean _textDirection
protected Float _pageWidth
protected Float _pageHeight
protected boolean _isPageSizeInches
protected String _uri
protected File _file
protected boolean _testMode
protected int _initialPageNumber
protected short _pagingMode
protected FSObjectDrawerFactory _objectDrawerFactory
protected String _preferredTransformerFactoryImplementationClass
protected String _preferredDocumentBuilderFactoryImplementationClass
public TFinalClass addDOMMutator(FSDOMMutator domMutator)
domMutator - the DOM Mutatorpublic final TFinalClass useTransformerFactoryImplementationClass(String transformerFactoryClass)
transformerFactoryClass - public final TFinalClass useDocumentBuilderFactoryImplementationClass(String documentBuilderFactoryClass)
documentBuilderFactoryClass - public final TFinalClass defaultTextDirection(BaseRendererBuilder.TextDirection textDirection)
textDirection - public final TFinalClass testMode(boolean mode)
mode - public final TFinalClass useHttpStreamImplementation(HttpStreamFactory factory)
factory - public final TFinalClass useUriResolver(FSUriResolver resolver)
resolver - public final TFinalClass useCache(FSCache cache)
cache - public final TFinalClass useUnicodeBidiSplitter(BidiSplitterFactory splitter)
splitter - public final TFinalClass useUnicodeBidiReorderer(BidiReorderer reorderer)
reorderer - public final TFinalClass withHtmlContent(String html, String baseUri)
html - baseUri - public final TFinalClass withW3cDocument(Document doc, String baseUri)
doc - baseUri - public final TFinalClass withUri(String uri)
uri - public final TFinalClass withFile(File file)
file - public final TFinalClass useSVGDrawer(SVGDrawer svgImpl)
svgImpl - the SVG implementationpublic final TFinalClass useMathMLDrawer(SVGDrawer mathMlImpl)
mathMlImpl - the MathML implementationpublic final TFinalClass useReplacementText(String replacement)
replacement - the default replacement textpublic final TFinalClass useUnicodeLineBreaker(FSTextBreaker breaker)
breaker - public final TFinalClass useUnicodeCharacterBreaker(FSTextBreaker breaker)
word-wrap: break-word is in effect.breaker - public final TFinalClass useUnicodeToUpperTransformer(FSTextTransformer tr)
String::toUpperCase(Locale.US) is used.tr - public final TFinalClass useUnicodeToLowerTransformer(FSTextTransformer tr)
String::toLowerCase(Locale.US) is used.tr - public final TFinalClass useUnicodeToTitleTransformer(FSTextTransformer tr)
tr - public final TFinalClass useDefaultPageSize(float pageWidth, float pageHeight, BaseRendererBuilder.PageSizeUnits units)
pageWidth - pageHeight - units - either mm or inches.#PAGE_SIZE_LETTER_WIDTH}, {@link #PAGE_SIZE_LETTER_HEIGHT} and
{@link #PAGE_SIZE_LETTER_UNITS}public final TFinalClass useObjectDrawerFactory(FSObjectDrawerFactory objectDrawerFactory)
objectDrawerFactory - Object Drawer FactoryCopyright © 2018. All rights reserved.