Package org.apache.fop.apps
Class FopFactoryBuilder
java.lang.Object
org.apache.fop.apps.FopFactoryBuilder
This is the builder class for
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();
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionFopFactoryBuilder(URI defaultBaseURI) A builder class forFopFactorywhich can be used for setting configuration.FopFactoryBuilder(URI defaultBaseURI, org.apache.xmlgraphics.io.ResourceResolver resourceResolver) A builder class forFopFactorywhich can be used for setting configuration.FopFactoryBuilder(EnvironmentProfile enviro) A builder class forFopFactorywhich can be used for setting configuration. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance of the theFopFactory.Deprecated.Returns theFontManagerused for managing the fonts within FOP.org.apache.xmlgraphics.image.loader.ImageManagerReturn theImageManagerused for handling images through out FOP.ignoreNamespace(String namespaceURI) FOP will ignore the specified XML element namespace.ignoreNamespaces(Collection<String> namespaceURIs) FOP will ignore the colletion of XML element namespaces.setAccessibility(boolean enableAccessibility) Sets whether to include accessibility features in document creation.setBaseURI(URI baseURI) Sets the base URI, this will be used for resolving all URIs given to FOP.setBreakIndentInheritanceOnReferenceAreaBoundary(boolean value) Sets whether the indent inheritance should be broken when crossing reference area boundaries.setComplexScriptFeatures(boolean csf) Sets the Avalon configuration if a FOP conf is used.protected FopFactoryBuildersetConfiguration(Configuration cfg, boolean parse) setHyphenBaseResourceResolver(InternalResourceResolver hyphenationResourceResolver) setHyphPatNames(Map<String, String> hyphPatNames) setKeepEmptyTags(boolean b) Sets theLayoutManagerMakerso that users can configure how FOP createsLayoutManagers.setLegacyLastPageChangeIPD(boolean b) setLegacySkipPagePositionOnly(boolean b) setPageHeight(String pageHeight) Sets the page height of the paginated output.setPageWidth(String pageWidth) Sets the page width of the paginated output.setPreferRenderer(boolean preferRenderer) Sets whether to chose aRendererin preference to anIFDocumentHandler.setSimpleLineBreaking(boolean b) setSkipPagePositionOnlyAllowed(boolean b) setSourceResolution(float dpi) Sets the resolution of resolution-dependent input.setStrictFOValidation(boolean validateStrictly) Sets whether to perform strict validation on the FO used.setStrictUserConfigValidation(boolean validateStrictly) Sets whether to perform strict alidation on the user-configuration.setTableBorderOverpaint(boolean b) setTargetResolution(float dpi) Sets the resolution of resolution-dependent output.
-
Constructor Details
-
FopFactoryBuilder
A builder class forFopFactorywhich can be used for setting configuration. This is a helper constructor that uses the default URI resolver implementation that FOP packages provide.- Parameters:
defaultBaseURI- the default base URI for resolving URIs against
-
FopFactoryBuilder
public FopFactoryBuilder(URI defaultBaseURI, org.apache.xmlgraphics.io.ResourceResolver resourceResolver) A builder class forFopFactorywhich can be used for setting configuration.- Parameters:
defaultBaseURI- the default base URI for resolving URIs againstresourceResolver- the URI resolver
-
FopFactoryBuilder
A builder class forFopFactorywhich can be used for setting configuration.- Parameters:
enviro- the profile of the FOP deployment environment
-
-
Method Details
-
buildConfig
Deprecated.Exposing theFopFactoryConfigis only to maintain backwards compatibilityReturns theFopFactoryConfigwhich is needed to get an instance ofFopFactory.- Returns:
- build the
FopFactoryConfig
-
build
Builds an instance of the theFopFactory.- Returns:
- the FopFactory instance
-
getFontManager
Returns theFontManagerused for managing the fonts within FOP.- Returns:
- the font managing object
-
getImageManager
public org.apache.xmlgraphics.image.loader.ImageManager getImageManager()Return theImageManagerused for handling images through out FOP.- Returns:
- the image manager
-
setAccessibility
Sets whether to include accessibility features in document creation.- Parameters:
enableAccessibility- true to set accessibility on- Returns:
this
-
setKeepEmptyTags
-
setLayoutManagerMakerOverride
Sets theLayoutManagerMakerso that users can configure how FOP createsLayoutManagers.- Parameters:
lmMaker- he layout manager maker- Returns:
this
-
setBaseURI
Sets the base URI, this will be used for resolving all URIs given to FOP.- Parameters:
baseURI- the base URI- Returns:
this
-
setHyphenBaseResourceResolver
public FopFactoryBuilder setHyphenBaseResourceResolver(InternalResourceResolver hyphenationResourceResolver) -
setStrictFOValidation
Sets whether to perform strict validation on the FO used.- Parameters:
validateStrictly- true if the FO is to be strictly validated- Returns:
this
-
setStrictUserConfigValidation
Sets whether to perform strict alidation on the user-configuration.- Parameters:
validateStrictly- true if the fop conf is to be strictly validated- Returns:
this
-
setBreakIndentInheritanceOnReferenceAreaBoundary
Sets whether the indent inheritance should be broken when crossing reference area boundaries.- Parameters:
value- true to break inheritance when crossing reference area boundaries- Returns:
this
-
setSourceResolution
Sets the resolution of resolution-dependent input.- Parameters:
dpi- the source resolution- Returns:
this
-
setTargetResolution
Sets the resolution of resolution-dependent output.- Parameters:
dpi- the target resolution- Returns:
this
-
setPageHeight
Sets the page height of the paginated output.- Parameters:
pageHeight- the page height- Returns:
this
-
setPageWidth
Sets the page width of the paginated output.- Parameters:
pageWidth- the page width- Returns:
this
-
ignoreNamespace
FOP will ignore the specified XML element namespace.- Parameters:
namespaceURI- the namespace URI to ignore- Returns:
this
-
ignoreNamespaces
FOP will ignore the colletion of XML element namespaces.- Parameters:
namespaceURIs- a collection of namespace URIs to ignore- Returns:
this
-
setConfiguration
Sets the Avalon configuration if a FOP conf is used.- Parameters:
cfg- the fop conf configuration- Returns:
this
-
setConfiguration
-
setPreferRenderer
Sets whether to chose aRendererin preference to anIFDocumentHandler.- Parameters:
preferRenderer- true to preferRenderer- Returns:
this
-
setComplexScriptFeatures
-
setHyphPatNames
-
setTableBorderOverpaint
-
setSimpleLineBreaking
-
setSkipPagePositionOnlyAllowed
-
setLegacySkipPagePositionOnly
-
setLegacyLastPageChangeIPD
-
FopFactoryConfigis only to maintain backwards compatibility