public class FOUserAgent extends Object
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
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_TARGET_RESOLUTION
Defines the default target resolution (72dpi) for FOP
|
Constructor and Description |
---|
FOUserAgent(FopFactory factory)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getAuthor()
Returns the author of the document
|
String |
getBaseURL()
Returns the base URL.
|
Date |
getCreationDate()
Returns the creation date of the document
|
String |
getCreator()
Returns the creator of the document
|
org.apache.fop.render.intermediate.IFDocumentHandler |
getDocumentHandlerOverride()
Returns the overriding
IFDocumentHandler instance, if any. |
org.apache.fop.events.EventBroadcaster |
getEventBroadcaster()
Returns the event broadcaster that control events sent inside a processing run.
|
FopFactory |
getFactory() |
org.apache.fop.fo.FOEventHandler |
getFOEventHandlerOverride()
Returns the overriding FOEventHandler instance, if any.
|
String |
getFontBaseURL()
Deprecated.
Use
FontManager.getFontBaseURL() instead. This method is not used by FOP. |
org.apache.xmlgraphics.image.loader.ImageSessionContext |
getImageSessionContext()
Returns the image session context for the image package.
|
String |
getKeywords()
Returns the keywords for the document
|
File |
getOutputFile()
Gets the output File.
|
String |
getPageHeight()
Gets the default page-height to use as fallback,
in case page-height="auto"
|
String |
getPageWidth()
Gets the default page-width to use as fallback,
in case page-width="auto"
|
String |
getProducer()
Returns the producer of the document
|
org.apache.fop.render.RendererFactory |
getRendererFactory() |
Map |
getRendererOptions()
Returns the renderer options
|
org.apache.fop.render.Renderer |
getRendererOverride()
Returns the overriding Renderer instance, if any.
|
float |
getSourcePixelUnitToMillimeter()
Returns the conversion factor from pixel units to millimeters.
|
float |
getSourceResolution() |
org.apache.fop.accessibility.StructureTree |
getStructureTree()
Returns the document's structure tree, for use by accessible output
formats.
|
String |
getSubject()
Returns the subject of the document
|
float |
getTargetPixelUnitToMillimeter()
Returns the conversion factor from pixel units to millimeters.
|
float |
getTargetResolution() |
String |
getTitle()
Returns the title of the document
|
URIResolver |
getURIResolver()
Returns the URI Resolver.
|
org.apache.fop.render.XMLHandlerRegistry |
getXMLHandlerRegistry() |
boolean |
isAccessibilityEnabled()
Check if accessibility is enabled.
|
boolean |
isBreakIndentInheritanceOnReferenceAreaBoundary() |
boolean |
isConserveMemoryPolicyEnabled()
Check whether memory-conservation is enabled.
|
boolean |
isLocatorEnabled()
Checks if the use of Locators is enabled
|
Source |
resolveURI(String uri)
Attempts to resolve the given URI.
|
Source |
resolveURI(String href,
String base)
Attempts to resolve the given URI.
|
void |
setAccessibility(boolean accessibility)
Activates accessibility (for output formats that support it).
|
void |
setAuthor(String author)
Sets the author of the document.
|
void |
setBaseURL(String baseUrl)
Sets the base URL.
|
void |
setConserveMemoryPolicy(boolean conserveMemoryPolicy)
Control whether memory-conservation should be enabled
|
void |
setCreationDate(Date creationDate)
Sets the creation date of the document.
|
void |
setCreator(String creator)
Sets the creator of the document.
|
void |
setDocumentHandlerOverride(org.apache.fop.render.intermediate.IFDocumentHandler documentHandler)
Sets an explicit document handler to use which overrides the one that would be
selected by default.
|
void |
setFOEventHandlerOverride(org.apache.fop.fo.FOEventHandler handler)
Sets an explicit FOEventHandler instance which overrides the one
defined by the render type setting.
|
void |
setFontBaseURL(String fontBaseUrl)
Deprecated.
Use
FontManager.setFontBaseURL(String) instead. |
void |
setKeywords(String keywords)
Sets the keywords for the document.
|
void |
setLocatorEnabled(boolean enableLocator)
Controls the use of SAXLocators to provide location information in error
messages.
|
void |
setOutputFile(File f)
Sets the output File.
|
void |
setProducer(String producer)
Sets the producer of the document.
|
void |
setRendererOverride(org.apache.fop.render.Renderer renderer)
Sets an explicit renderer to use which overrides the one defined by the
render type setting.
|
void |
setStructureTree(org.apache.fop.accessibility.StructureTree structureTree)
Sets the document's structure tree, for use by accessible output formats.
|
void |
setSubject(String subject)
Sets the subject of the document.
|
void |
setTargetResolution(float dpi)
Sets the target resolution in dpi.
|
void |
setTargetResolution(int dpi)
Sets the target resolution in dpi.
|
void |
setTitle(String title)
Sets the title of the document.
|
void |
setURIResolver(URIResolver resolver)
Sets the URI Resolver.
|
boolean |
validateStrictly()
Returns whether FOP is strictly validating input XSL
|
public static final float DEFAULT_TARGET_RESOLUTION
public FOUserAgent(FopFactory factory)
factory
- the factory that provides environment-level informationFopFactory
public FopFactory getFactory()
public void setDocumentHandlerOverride(org.apache.fop.render.intermediate.IFDocumentHandler documentHandler)
documentHandler
- the document handler instance to usepublic org.apache.fop.render.intermediate.IFDocumentHandler getDocumentHandlerOverride()
IFDocumentHandler
instance, if any.public void setRendererOverride(org.apache.fop.render.Renderer renderer)
renderer
- the Renderer instance to usepublic org.apache.fop.render.Renderer getRendererOverride()
public void setFOEventHandlerOverride(org.apache.fop.fo.FOEventHandler handler)
handler
- the FOEventHandler instancepublic org.apache.fop.fo.FOEventHandler getFOEventHandlerOverride()
public void setProducer(String producer)
producer
- source of documentpublic String getProducer()
public void setCreator(String creator)
creator
- of documentpublic String getCreator()
public void setCreationDate(Date creationDate)
creationDate
- date of documentpublic Date getCreationDate()
public void setAuthor(String author)
author
- of documentpublic String getAuthor()
public void setTitle(String title)
title
- of documentpublic String getTitle()
public void setSubject(String subject)
subject
- of documentpublic String getSubject()
public void setKeywords(String keywords)
keywords
- for the documentpublic String getKeywords()
public Map getRendererOptions()
public void setBaseURL(String baseUrl)
baseUrl
- base URLpublic void setFontBaseURL(String fontBaseUrl)
FontManager.setFontBaseURL(String)
instead.fontBaseUrl
- font base URLpublic String getBaseURL()
public void setURIResolver(URIResolver resolver)
resolver
- the new URI resolverpublic URIResolver getURIResolver()
public Source resolveURI(String uri)
uri
- URI to accessSource
object, or null if the URI
cannot be resolved.FOURIResolver
public Source resolveURI(String href, String base)
href
- URI to accessbase
- the base URI to resolve againstSource
object, or null if the URI
cannot be resolved.FOURIResolver
public void setOutputFile(File f)
f
- the output Filepublic File getOutputFile()
public float getTargetPixelUnitToMillimeter()
getTargetResolution()
public float getTargetResolution()
public void setTargetResolution(float dpi)
dpi
- resolution in dpipublic void setTargetResolution(int dpi)
dpi
- resolution in dpipublic org.apache.xmlgraphics.image.loader.ImageSessionContext getImageSessionContext()
public String getFontBaseURL()
FontManager.getFontBaseURL()
instead. This method is not used by FOP.public float getSourcePixelUnitToMillimeter()
getSourceResolution()
public float getSourceResolution()
public String getPageHeight()
FopFactory.getPageHeight()
public String getPageWidth()
FopFactory.getPageWidth()
public boolean validateStrictly()
FopFactory.validateStrictly()
public boolean isBreakIndentInheritanceOnReferenceAreaBoundary()
FopFactory.isBreakIndentInheritanceOnReferenceAreaBoundary()
public org.apache.fop.render.RendererFactory getRendererFactory()
public org.apache.fop.render.XMLHandlerRegistry getXMLHandlerRegistry()
public void setLocatorEnabled(boolean enableLocator)
enableLocator
- false
if SAX Locators should be disabledpublic boolean isLocatorEnabled()
public org.apache.fop.events.EventBroadcaster getEventBroadcaster()
public boolean isConserveMemoryPolicyEnabled()
public void setConserveMemoryPolicy(boolean conserveMemoryPolicy)
conserveMemoryPolicy
- the cachingEnabled to setpublic void setAccessibility(boolean accessibility)
accessibility
- true
to enable accessibility supportpublic boolean isAccessibilityEnabled()
public void setStructureTree(org.apache.fop.accessibility.StructureTree structureTree)
structureTree
- a simplified version of the FO tree, retaining only
its logical structurepublic org.apache.fop.accessibility.StructureTree getStructureTree()
Copyright © 2010 - 2020 Adobe. All Rights Reserved