AbstractPathOrientedRenderer
, AbstractRenderer
, AbstractXMLRenderer
, AWTRenderer
, IFRenderer
, Java2DRenderer
, PageableRenderer
, PNGRenderer
, PrintRenderer
, PrintRenderer
, SVGRenderer
, TIFFRenderer
, TXTRenderer
, XMLRenderer
public interface Renderer
A Renderer implementation takes areas/spaces and produces output in some format.
Typically, most renderers are subclassed from FOP's abstract implementations
(AbstractRenderer
, PrintRenderer
) which already handle a lot
of things letting you concentrate on the details of the output format.
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
ROLE |
Role constant for Avalon.
|
Modifier and Type | Method | Description |
---|---|---|
Graphics2DAdapter |
getGraphics2DAdapter() |
|
ImageAdapter |
getImageAdapter() |
|
java.lang.String |
getMimeType() |
Get the MIME type of the renderer.
|
FOUserAgent |
getUserAgent() |
Returns the associated user agent.
|
void |
preparePage(PageViewport page) |
This is called if the renderer supports out of order rendering.
|
void |
processOffDocumentItem(OffDocumentItem odi) |
Tells the renderer to process an item not explicitly placed on the
document (e.g., PDF bookmarks).
|
void |
renderPage(PageViewport page) |
Tells the renderer to render a particular page.
|
void |
setDocumentLocale(java.util.Locale locale) |
|
void |
setupFontInfo(FontInfo fontInfo) |
Set up the given FontInfo.
|
void |
startPageSequence(LineArea seqTitle) |
Deprecated.
Use
startPageSequence(PageSequence) instead |
void |
startPageSequence(PageSequence pageSequence) |
Tells the renderer that a new page sequence starts.
|
void |
startRenderer(java.io.OutputStream outputStream) |
Initiates the rendering phase.
|
void |
stopRenderer() |
Signals the end of the rendering phase.
|
boolean |
supportsOutOfOrder() |
Reports if out of order rendering is supported.
|
java.lang.String getMimeType()
void startRenderer(java.io.OutputStream outputStream) throws java.io.IOException
outputStream
- The OutputStream to use for outputjava.io.IOException
- If an I/O error occursvoid stopRenderer() throws java.io.IOException
java.io.IOException
- If an I/O error occursFOUserAgent getUserAgent()
void setupFontInfo(FontInfo fontInfo) throws FOPException
fontInfo
- The font informationFOPException
- if an error occurs while setting up the font info objectboolean supportsOutOfOrder()
Normally, all pages of a document are rendered in their natural order (page 1, page 2, page 3 etc.). Some output formats (such as PDF) allow pages to be output in random order. This is helpful to reduce resource strain on the system because a page that cannot be fully resolved doesn't block subsequent pages that are already fully resolved.
void setDocumentLocale(java.util.Locale locale)
locale
- Locale of the languagevoid processOffDocumentItem(OffDocumentItem odi)
odi
- The off-document item to be renderedGraphics2DAdapter getGraphics2DAdapter()
ImageAdapter getImageAdapter()
void preparePage(PageViewport page)
renderPage(PageViewport)
.page
- The page viewport to usevoid startPageSequence(LineArea seqTitle)
startPageSequence(PageSequence)
insteadseqTitle
- The title of the page sequencevoid startPageSequence(PageSequence pageSequence)
pageSequence
- the page sequencevoid renderPage(PageViewport page) throws java.io.IOException, FOPException
page
- The page to be renderedjava.io.IOException
- if an I/O error occursFOPException
- if a FOP interal error occurs.Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.