This is the user agent for FOP.
It is the entity through which you can interact with the XSL-FO processing and is
used by the processing to obtain user configurable options.
Renderer specific extensions (that do not produce normal areas on
the output) will be done like so:
The extension will create an area, custom if necessary
this area will be added to the user agent with a key
the renderer will know keys for particular extensions
eg. bookmarks will be held in a special hierarchical area representing
the title and bookmark structure
These areas may contain resolvable areas that will be processed
with other resolvable areas
getAuthor
public String getAuthor()
Returns the author of the document
getBaseURL
public String getBaseURL()
Returns the base URL.
getCreationDate
public Date getCreationDate()
Returns the creation date of the document
- creation date of document
getCreator
public String getCreator()
Returns the creator of the document
getFOEventHandlerOverride
public FOEventHandler getFOEventHandlerOverride()
Returns the overriding FOEventHandler instance, if any.
- the overriding FOEventHandler or null
getFactory
public FopFactory getFactory()
- the associated FopFactory instance
getFontBaseURL
public String getFontBaseURL()
getKeywords
public String getKeywords()
Returns the keywords for the document
getOutputFile
public File getOutputFile()
Gets the output File.
getPDFEncryptionParams
public PDFEncryptionParams getPDFEncryptionParams()
Use (PDFEncryptionParams)getRendererOptions().get("encryption-params")
instead.
Returns the parameters for PDF encryption.
- the PDF encryption parameters, null if not applicable
getPageHeight
public String getPageHeight()
Gets the default page-height to use as fallback,
in case page-height="auto"
- the page-height, as a String
getPageWidth
public String getPageWidth()
Gets the default page-width to use as fallback,
in case page-width="auto"
- the page-width, as a String
getProducer
public String getProducer()
Returns the producer of the document
getRendererOptions
public Map getRendererOptions()
Returns the renderer options
getRendererOverride
public Renderer getRendererOverride()
Returns the overriding Renderer instance, if any.
- the overriding Renderer or null
getSourcePixelUnitToMillimeter
public float getSourcePixelUnitToMillimeter()
Returns the conversion factor from pixel units to millimeters. This
depends on the desired source resolution.
getSourceResolution
public float getSourceResolution()
- the resolution for resolution-dependant input
getTargetPixelUnitToMillimeter
public float getTargetPixelUnitToMillimeter()
Returns the conversion factor from pixel units to millimeters. This
depends on the desired target resolution.
getTargetResolution
public float getTargetResolution()
- the resolution for resolution-dependant output
getTitle
public String getTitle()
Returns the title of the document
getURIResolver
public URIResolver getURIResolver()
Returns the URI Resolver.
isBreakIndentInheritanceOnReferenceAreaBoundary
public boolean isBreakIndentInheritanceOnReferenceAreaBoundary()
- true if the indent inheritance should be broken when crossing reference area
boundaries (for more info, see the javadoc for the relative member variable)
isLocatorEnabled
public boolean isLocatorEnabled()
Checks if the use of Locators is enabled
- true if context information should be stored on each node in the FO tree.
resolveURI
public Source resolveURI(String uri)
Attempts to resolve the given URI.
Will use the configured resolver and if not successful fall back
to the default resolver.
- A
javax.xml.transform.Source
object, or null if the URI
cannot be resolved.
resolveURI
public Source resolveURI(String href,
String base)
Attempts to resolve the given URI.
Will use the configured resolver and if not successful fall back
to the default resolver.
href
- URI to accessbase
- the base URI to resolve against
- A
javax.xml.transform.Source
object, or null if the URI
cannot be resolved.
setAuthor
public void setAuthor(String author)
Sets the author of the document.
setBaseURL
public void setBaseURL(String baseUrl)
Sets the base URL.
setCreationDate
public void setCreationDate(Date creationDate)
Sets the creation date of the document.
creationDate
- date of document
setCreator
public void setCreator(String creator)
Sets the creator of the document.
setFOEventHandlerOverride
public void setFOEventHandlerOverride(FOEventHandler handler)
Sets an explicit FOEventHandler instance which overrides the one
defined by the render type setting.
handler
- the FOEventHandler instance
setFontBaseURL
public void setFontBaseURL(String fontBaseUrl)
sets font base URL
fontBaseUrl
- font base URL
setKeywords
public void setKeywords(String keywords)
Sets the keywords for the document.
keywords
- for the document
setLocatorEnabled
public void setLocatorEnabled(boolean enableLocator)
Controls the use of SAXLocators to provide location information in error
messages.
enableLocator
- false
if SAX Locators should be disabled
setOutputFile
public void setOutputFile(File f)
Sets the output File.
setPDFEncryptionParams
public void setPDFEncryptionParams(PDFEncryptionParams pdfEncryptionParams)
Use getRendererOptions().put("encryption-params",
new PDFEncryptionParams(..)) instead or set every parameter separately:
getRendererOptions().put("noprint", Boolean.TRUE).
Sets the parameters for PDF encryption.
pdfEncryptionParams
- the PDF encryption parameters, null to
disable PDF encryption
setProducer
public void setProducer(String producer)
Sets the producer of the document.
producer
- source of document
setRendererOverride
public void setRendererOverride(Renderer renderer)
Sets an explicit renderer to use which overrides the one defined by the
render type setting.
renderer
- the Renderer instance to use
setTargetResolution
public void setTargetResolution(float dpi)
Sets the target resolution in dpi. This value defines the target resolution of
bitmap images generated by the bitmap renderers (such as the TIFF renderer) and of
bitmap images generated by filter effects in Apache Batik.
setTargetResolution
public void setTargetResolution(int dpi)
Sets the target resolution in dpi. This value defines the target resolution of
bitmap images generated by the bitmap renderers (such as the TIFF renderer) and of
bitmap images generated by filter effects in Apache Batik.
setTitle
public void setTitle(String title)
Sets the title of the document. This will override any title coming from
an fo:title element.
setURIResolver
public void setURIResolver(URIResolver resolver)
Sets the URI Resolver.
resolver
- the new URI resolver
validateStrictly
public boolean validateStrictly()
Returns whether FOP is strictly validating input XSL
- true of strict validation turned on, false otherwise