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

public class DocumentRenderer extends ContainerRenderer
Internal Use Only.

Render a DocumentModel to PDF.

Author:
jamson
  • Constructor Details

  • Method Details

    • save

      public void save(OutputStream os) throws IOException
      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: IRenderer
      Render the DocumentNode.
    • getRootRenderer

      public DocumentRenderer getRootRenderer()
      Description copied from interface: IRenderer
      Returns the root renderer.
      Returns:
      the root renderer
    • getCS

      public org.apache.pdfbox.pdmodel.PDPageContentStream getCS()
      Description copied from interface: IRenderer
      Returns the content stream of current page.
      Returns:
      the content stream of current page
    • getDocument

      public org.apache.pdfbox.pdmodel.PDDocument getDocument()
      Returns the PDDocument of this DocumentRenderer.
      Returns:
      the PDDocument of this DocumentRenderer.
    • 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

      public PdfFont getFont()
      Returns the PdfFont used to render text.
      Returns:
      the PdfFont of this document renderer.