Package org.ghost4j.renderer
Class AbstractRenderer
java.lang.Object
org.ghost4j.AbstractComponent
org.ghost4j.renderer.AbstractRenderer
Abstract renderer implementation. Contains methods that are common to the
different renderer types
-
Field Summary
Fields inherited from class org.ghost4j.AbstractComponent
supportedDocumentClasses
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRenders a given document an outputs result as a list of Image objects (on image per page).Renders pages of a given document an outputs result as a list of Image objects (on image per page).Methods inherited from class org.ghost4j.AbstractComponent
assertDeviceSupported, assertDocumentSupported, copySettings, extractSettings, isDeviceSupported
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ghost4j.Component
copySettings, extractSettings
-
Constructor Details
-
AbstractRenderer
public AbstractRenderer()
-
-
Method Details
-
render
public List<Image> render(Document document) throws IOException, RendererException, DocumentException Description copied from interface:Renderer
Renders a given document an outputs result as a list of Image objects (on image per page).- Specified by:
render
in interfaceRenderer
- Parameters:
document
- Document to render. Document type may or may no be supported (support left to the render final implementation).- Returns:
- a List of Image objects
- Throws:
IOException
RendererException
DocumentException
-
render
public List<Image> render(Document document, int begin, int end) throws IOException, RendererException, DocumentException Description copied from interface:Renderer
Renders pages of a given document an outputs result as a list of Image objects (on image per page).- Specified by:
render
in interfaceRenderer
- Parameters:
document
- Document to render. Document type may or may no be supported (support left to the render final implementation).begin
- Index of the first page to renderend
- Index of the last page to render- Returns:
- a List of Image objects
- Throws:
IOException
RendererException
DocumentException
-
run
protected abstract List<Image> run(Document document, int begin, int end) throws IOException, RendererException, DocumentException
-