Class PdfBoxRenderer

    • Method Detail

      • getDocument

        public Document getDocument()
      • getPdfDocument

        public org.apache.pdfbox.pdmodel.PDDocument getPdfDocument()
        Returns the PDDocument or null if it has been closed.
      • getFontResolver

        public PdfBoxFontResolver getFontResolver()
        Get the PDF-BOX font resolver. Can be used to add fonts in code.
        Returns:
      • getPDFVersion

        public float getPDFVersion()
      • layout

        public void layout()
      • createPDF

        public void createPDF()
                       throws IOException
        Creates a PDF with setup specified by builder. On finsihing or failing, saves (if successful) and closes the PDF document.
        Throws:
        IOException
      • createPDFWithoutClosing

        public void createPDFWithoutClosing()
                                     throws IOException
        Creates a PDF with setup specified by builder. On finsihing or failing, DOES NOT save or close the PDF document. Useful for post-processing the PDDocument which can be retrieved by getPdfDocument().
        Throws:
        IOException
      • writeNextDocument

        @Deprecated
        public void writeNextDocument​(int initialPageNo)
                               throws IOException
        Deprecated.
        Doubt this still works as untested.
        Throws:
        IOException
      • createPDF

        @Deprecated
        public void createPDF​(OutputStream os,
                              boolean finish,
                              int initialPageNo)
                       throws IOException
        Deprecated.
        Use builder to set output stream. NOTE: Caller is responsible for cleaning up the OutputStream.
        Throws:
        IOException
      • getSharedContext

        public com.openhtmltopdf.layout.SharedContext getSharedContext()
      • getRootBox

        public com.openhtmltopdf.render.BlockBox getRootBox()
      • getDotsPerPoint

        public float getDotsPerPoint()
      • findPagePositionsByID

        public List findPagePositionsByID​(Pattern pattern)
      • cleanup

        @Deprecated
        public void cleanup()
        Deprecated.
        Use close instead.
      • close

        public void close()
        Cleanup thread resources. MUST be called after finishing with the renderer.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable