public final class FopFactoryBuilder extends Object
FopFactory
. Setters can be chained to
make building a FopFactory
object more concise and intuitive e.g.
FopFactoryBuilder fopFactoryBuilder = new FopFactoryBuilder(<URI>)
.setURIResolver(<URIResolver>)
.setPageHeight(<String>)
.setPageWidth(<String>)
.setStrictUserConfigValidation(<boolean>)
... etc ...
FopFactory fopFactory = fopFactoryBuilder.build();
Modifier and Type | Class and Description |
---|---|
static class |
FopFactoryBuilder.FopFactoryConfigImpl |
Constructor and Description |
---|
FopFactoryBuilder(EnvironmentProfile enviro)
A builder class for
FopFactory which can be used for setting configuration. |
FopFactoryBuilder(URI defaultBaseURI)
A builder class for
FopFactory which can be used for setting configuration. |
FopFactoryBuilder(URI defaultBaseURI,
org.apache.xmlgraphics.io.ResourceResolver resourceResolver)
A builder class for
FopFactory which can be used for setting configuration. |
Modifier and Type | Method and Description |
---|---|
FopFactory |
build()
Builds an instance of the the
FopFactory . |
FopFactoryConfig |
buildConfig()
Deprecated.
Exposing the
FopFactoryConfig is only to maintain backwards compatibility |
FontManager |
getFontManager()
Returns the
FontManager used for managing the fonts within FOP. |
org.apache.xmlgraphics.image.loader.ImageManager |
getImageManager()
Return the
ImageManager used for handling images through out FOP. |
FopFactoryBuilder |
ignoreNamespace(String namespaceURI)
FOP will ignore the specified XML element namespace.
|
FopFactoryBuilder |
ignoreNamespaces(Collection<String> namespaceURIs)
FOP will ignore the colletion of XML element namespaces.
|
FopFactoryBuilder |
setAccessibility(boolean enableAccessibility)
Sets whether to include accessibility features in document creation.
|
FopFactoryBuilder |
setBaseURI(URI baseURI)
Sets the base URI, this will be used for resolving all URIs given to FOP.
|
FopFactoryBuilder |
setBreakIndentInheritanceOnReferenceAreaBoundary(boolean value)
Sets whether the indent inheritance should be broken when crossing reference area boundaries.
|
FopFactoryBuilder |
setComplexScriptFeatures(boolean csf) |
FopFactoryBuilder |
setConfiguration(Configuration cfg)
Sets the Avalon configuration if a FOP conf is used.
|
protected FopFactoryBuilder |
setConfiguration(Configuration cfg,
boolean parse) |
FopFactoryBuilder |
setHyphenBaseResourceResolver(InternalResourceResolver hyphenationResourceResolver) |
FopFactoryBuilder |
setHyphPatNames(Map<String,String> hyphPatNames) |
FopFactoryBuilder |
setKeepEmptyTags(boolean b) |
FopFactoryBuilder |
setLayoutManagerMakerOverride(LayoutManagerMaker lmMaker)
Sets the
LayoutManagerMaker so that users can configure how FOP creates
LayoutManager s. |
FopFactoryBuilder |
setLegacyFoWrapper(boolean b) |
FopFactoryBuilder |
setLegacyLastPageChangeIPD(boolean b) |
FopFactoryBuilder |
setLegacySkipPagePositionOnly(boolean b) |
FopFactoryBuilder |
setPageHeight(String pageHeight)
Sets the page height of the paginated output.
|
FopFactoryBuilder |
setPageWidth(String pageWidth)
Sets the page width of the paginated output.
|
FopFactoryBuilder |
setPreferRenderer(boolean preferRenderer)
Sets whether to chose a
Renderer in preference to an
IFDocumentHandler . |
FopFactoryBuilder |
setSimpleLineBreaking(boolean b) |
FopFactoryBuilder |
setSkipPagePositionOnlyAllowed(boolean b) |
FopFactoryBuilder |
setSourceResolution(float dpi)
Sets the resolution of resolution-dependent input.
|
FopFactoryBuilder |
setStaticRegionsPerPageForAccessibility(boolean staticRegionsPerPageForAccessibility) |
FopFactoryBuilder |
setStrictFOValidation(boolean validateStrictly)
Sets whether to perform strict validation on the FO used.
|
FopFactoryBuilder |
setStrictUserConfigValidation(boolean validateStrictly)
Sets whether to perform strict alidation on the user-configuration.
|
FopFactoryBuilder |
setTableBorderOverpaint(boolean b) |
FopFactoryBuilder |
setTargetResolution(float dpi)
Sets the resolution of resolution-dependent output.
|
public FopFactoryBuilder(URI defaultBaseURI)
FopFactory
which can be used for setting configuration. This is
a helper constructor that uses the default URI resolver implementation that FOP packages
provide.defaultBaseURI
- the default base URI for resolving URIs againstpublic FopFactoryBuilder(URI defaultBaseURI, org.apache.xmlgraphics.io.ResourceResolver resourceResolver)
FopFactory
which can be used for setting configuration.defaultBaseURI
- the default base URI for resolving URIs againstresourceResolver
- the URI resolverpublic FopFactoryBuilder(EnvironmentProfile enviro)
FopFactory
which can be used for setting configuration.enviro
- the profile of the FOP deployment environmentpublic FopFactoryConfig buildConfig()
FopFactoryConfig
is only to maintain backwards compatibilityFopFactoryConfig
which is needed to get an instance of
FopFactory
.FopFactoryConfig
public FopFactory build()
FopFactory
.public FontManager getFontManager()
FontManager
used for managing the fonts within FOP.public org.apache.xmlgraphics.image.loader.ImageManager getImageManager()
ImageManager
used for handling images through out FOP.public FopFactoryBuilder setAccessibility(boolean enableAccessibility)
enableAccessibility
- true to set accessibility onthis
public FopFactoryBuilder setStaticRegionsPerPageForAccessibility(boolean staticRegionsPerPageForAccessibility)
public FopFactoryBuilder setKeepEmptyTags(boolean b)
public FopFactoryBuilder setLayoutManagerMakerOverride(LayoutManagerMaker lmMaker)
LayoutManagerMaker
so that users can configure how FOP creates
LayoutManager
s.lmMaker
- he layout manager makerthis
public FopFactoryBuilder setBaseURI(URI baseURI)
baseURI
- the base URIthis
public FopFactoryBuilder setHyphenBaseResourceResolver(InternalResourceResolver hyphenationResourceResolver)
public FopFactoryBuilder setStrictFOValidation(boolean validateStrictly)
validateStrictly
- true if the FO is to be strictly validatedthis
public FopFactoryBuilder setStrictUserConfigValidation(boolean validateStrictly)
validateStrictly
- true if the fop conf is to be strictly validatedthis
public FopFactoryBuilder setBreakIndentInheritanceOnReferenceAreaBoundary(boolean value)
value
- true to break inheritance when crossing reference area boundariesthis
public FopFactoryBuilder setSourceResolution(float dpi)
dpi
- the source resolutionthis
public FopFactoryBuilder setTargetResolution(float dpi)
dpi
- the target resolutionthis
public FopFactoryBuilder setPageHeight(String pageHeight)
pageHeight
- the page heightthis
public FopFactoryBuilder setPageWidth(String pageWidth)
pageWidth
- the page widththis
public FopFactoryBuilder ignoreNamespace(String namespaceURI)
namespaceURI
- the namespace URI to ignorethis
public FopFactoryBuilder ignoreNamespaces(Collection<String> namespaceURIs)
namespaceURIs
- a collection of namespace URIs to ignorethis
public FopFactoryBuilder setConfiguration(Configuration cfg)
cfg
- the fop conf configurationthis
protected FopFactoryBuilder setConfiguration(Configuration cfg, boolean parse)
public FopFactoryBuilder setPreferRenderer(boolean preferRenderer)
Renderer
in preference to an
IFDocumentHandler
.preferRenderer
- true to prefer Renderer
this
public FopFactoryBuilder setComplexScriptFeatures(boolean csf)
public FopFactoryBuilder setHyphPatNames(Map<String,String> hyphPatNames)
public FopFactoryBuilder setTableBorderOverpaint(boolean b)
public FopFactoryBuilder setSimpleLineBreaking(boolean b)
public FopFactoryBuilder setSkipPagePositionOnlyAllowed(boolean b)
public FopFactoryBuilder setLegacySkipPagePositionOnly(boolean b)
public FopFactoryBuilder setLegacyLastPageChangeIPD(boolean b)
public FopFactoryBuilder setLegacyFoWrapper(boolean b)
Copyright © 2025 Apache Software Foundation. All rights reserved.