|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface implemented by all renderers. This interface is used to control the rendering of pages and to let block and inline level areas call the appropriate method to render themselves.
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.
Field Summary | |
static java.lang.String |
ROLE
Role constant for Avalon. |
Method Summary | |
Graphics2DAdapter |
getGraphics2DAdapter()
|
ImageAdapter |
getImageAdapter()
|
java.lang.String |
getMimeType()
Get the MIME type of the renderer. |
void |
preparePage(PageViewport page)
This is called if the renderer supports out of order rendering. |
void |
processOffDocumentItem(OffDocumentItem ext)
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 |
setupFontInfo(FontInfo fontInfo)
Set up the given FontInfo. |
void |
setUserAgent(FOUserAgent agent)
Set the User Agent. |
void |
startPageSequence(LineArea seqTitle)
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. |
Field Detail |
public static final java.lang.String ROLE
Method Detail |
public java.lang.String getMimeType()
public void startRenderer(java.io.OutputStream outputStream) throws java.io.IOException
outputStream
- The OutputStream to use for output
java.io.IOException
- If an I/O error occurspublic void stopRenderer() throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic void setUserAgent(FOUserAgent agent)
agent
- The User Agentpublic void setupFontInfo(FontInfo fontInfo)
fontInfo
- The font informationpublic boolean 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.
public void processOffDocumentItem(OffDocumentItem ext)
ext
- The extension element to be renderedpublic Graphics2DAdapter getGraphics2DAdapter()
public ImageAdapter getImageAdapter()
public void preparePage(PageViewport page)
renderPage(PageViewport)
.
page
- The page viewport to usepublic void startPageSequence(LineArea seqTitle)
seqTitle
- The title of the page sequencepublic void renderPage(PageViewport page) throws java.io.IOException, FOPException
page
- The page to be rendered
java.io.IOException
- if an I/O error occurs
FOPException
- if a FOP interal error occurs.
|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |