Package org.apache.fop.area
Class CachedRenderPagesModel
java.lang.Object
org.apache.fop.area.AreaTreeModel
org.apache.fop.area.RenderPagesModel
org.apache.fop.area.CachedRenderPagesModel
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
Fields inherited from class org.apache.fop.area.RenderPagesModel
prepared, rendererFields inherited from class org.apache.fop.area.AreaTreeModel
currentPageSequence, log -
Constructor Summary
ConstructorsConstructorDescriptionCachedRenderPagesModel(FOUserAgent userAgent, String outputFormat, FontInfo fontInfo, OutputStream stream) Main Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckPreparedPages(PageViewport newpage, boolean renderUnresolved) Check prepared pagesvoidEnd the document.protected voidsavePage(PageViewport page) Save a page.Methods inherited from class org.apache.fop.area.RenderPagesModel
addPage, handleOffDocumentItem, preparePage, renderPage, setDocumentLocale, startPageSequenceMethods inherited from class org.apache.fop.area.AreaTreeModel
getCurrentPageSequence, getPage, getPageCount, getPageSequenceCount
-
Constructor Details
-
CachedRenderPagesModel
public CachedRenderPagesModel(FOUserAgent userAgent, String outputFormat, FontInfo fontInfo, OutputStream stream) throws FOPException Main Constructor- Parameters:
userAgent- FOUserAgent object for processoutputFormat- the MIME type of the output format to use (ex. "application/pdf").fontInfo- FontInfo objectstream- OutputStream- Throws:
FOPException- if the renderer cannot be properly initialized
-
-
Method Details
-
checkPreparedPages
Check prepared pages- Overrides:
checkPreparedPagesin classRenderPagesModel- Parameters:
newpage- the new page being addedrenderUnresolved- render pages with unresolved idref's (done at end-of-document processing)- Returns:
- true if the current page should be rendered false if the renderer doesn't support out of order rendering and there are pending pages
-
savePage
Save a page. It saves the contents of the page to a file.- Parameters:
page- the page to prepare
-
endDocument
End the document. Render any end document OffDocumentItems Signal the end of the document for any processing.- Overrides:
endDocumentin classRenderPagesModel- Throws:
SAXException- if a problem was encountered.
-