Class DocumentRenderer
java.lang.Object
io.keikai.doc.io.schema.pdf.render.ContainerRenderer
io.keikai.doc.io.schema.pdf.render.DocumentRenderer
- All Implemented Interfaces:
IRenderer
Internal Use Only.
Render a DocumentModel to PDF.
- Author:
- jamson
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentRenderer(PDFDocument pdfDocument) Create a new renderer for the specifiedPDFDocument. -
Method Summary
Modifier and TypeMethodDescriptionvoiddecreaseCursorY(float offset) org.apache.pdfbox.pdmodel.PDPageContentStreamgetCS()Returns the content stream of current page.floatorg.apache.pdfbox.pdmodel.PDDocumentReturns thePDDocumentof thisDocumentRenderer.getFont()Returns thePdfFontused to render text.org.apache.pdfbox.pdmodel.common.PDRectanglegetRect()Returns the root renderer.voidbooleanisExceedY(float offset) voidrender()Render theDocumentNode.voidsave(OutputStream os) Save the PDF to the specified output stream.
-
Constructor Details
-
DocumentRenderer
Create a new renderer for the specifiedPDFDocument.- Parameters:
pdfDocument- thePDFDocument
-
-
Method Details
-
save
Save the PDF to the specified output stream.- Parameters:
os- the output stream- Throws:
IOException- if an I/O error occurs
-
render
public void render()Description copied from interface:IRendererRender theDocumentNode. -
getRootRenderer
Description copied from interface:IRendererReturns the root renderer.- Returns:
- the root renderer
-
getCS
public org.apache.pdfbox.pdmodel.PDPageContentStream getCS()Description copied from interface:IRendererReturns the content stream of current page.- Returns:
- the content stream of current page
-
getDocument
public org.apache.pdfbox.pdmodel.PDDocument getDocument()Returns thePDDocumentof thisDocumentRenderer.- Returns:
- the
PDDocumentof thisDocumentRenderer.
-
getRect
public org.apache.pdfbox.pdmodel.common.PDRectangle getRect() -
getCursorY
public float getCursorY() -
decreaseCursorY
public void decreaseCursorY(float offset) -
isExceedY
public boolean isExceedY(float offset) -
handleExceedY
public void handleExceedY() -
getFont
Returns thePdfFontused to render text.- Returns:
- the
PdfFontof this document renderer.
-