org.apache.fop.area

Class CachedRenderPagesModel


public class CachedRenderPagesModel
extends RenderPagesModel

A simple cached render pages model. If the page is prepared for later rendering then this saves the page contents to a file and once the page is resolved the contents are reloaded.

Field Summary

protected File
baseDir
Base directory to save temporary file in, typically points to the user's temp dir.

Fields inherited from class org.apache.fop.area.RenderPagesModel

prepared, renderer

Fields inherited from class org.apache.fop.area.AreaTreeModel

currentPageSequence, log

Constructor Summary

CachedRenderPagesModel(FOUserAgent userAgent, String outputFormat, FontInfo fontInfo, OutputStream stream)
Main Constructor

Method Summary

protected boolean
checkPreparedPages(PageViewport newpage, boolean renderUnresolved)
void
endDocument()
protected void
savePage(PageViewport page)
Save a page.

Methods inherited from class org.apache.fop.area.RenderPagesModel

addPage, checkPreparedPages, endDocument, handleOffDocumentItem, preparePage, startPageSequence

Methods inherited from class org.apache.fop.area.AreaTreeModel

addPage, endDocument, getPage, getPageCount, getPageSequenceCount, handleOffDocumentItem, startPageSequence

Field Details

baseDir

protected File baseDir
Base directory to save temporary file in, typically points to the user's temp dir.

Constructor Details

CachedRenderPagesModel

public CachedRenderPagesModel(FOUserAgent userAgent,
                              String outputFormat,
                              FontInfo fontInfo,
                              OutputStream stream)
            throws FOPException
Main Constructor
Parameters:
userAgent - FOUserAgent object for process
outputFormat - the MIME type of the output format to use (ex. "application/pdf").
fontInfo - FontInfo object
stream - OutputStream
Throws:
FOPException - if the renderer cannot be properly initialized

Method Details

checkPreparedPages

protected boolean checkPreparedPages(PageViewport newpage,
                                     boolean renderUnresolved)
Overrides:
checkPreparedPages in interface RenderPagesModel

endDocument

public void endDocument()
            throws SAXException
Overrides:
endDocument in interface RenderPagesModel

savePage

protected void savePage(PageViewport page)
Save a page. It saves the contents of the page to a file.
Parameters:
page - the page to prepare

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.