Class ITextRenderer

java.lang.Object
org.xhtmlrenderer.pdf.ITextRenderer

@ParametersAreNonnullByDefault public class ITextRenderer extends Object
  • Field Details

    • DEFAULT_DOTS_PER_POINT

      public static final float DEFAULT_DOTS_PER_POINT
      See Also:
    • DEFAULT_DOTS_PER_PIXEL

      public static final int DEFAULT_DOTS_PER_PIXEL
      See Also:
    • _sharedContext

      private final SharedContext _sharedContext
    • _outputDevice

      private final ITextOutputDevice _outputDevice
    • _doc

      private Document _doc
    • _root

      private BlockBox _root
    • _dotsPerPoint

      private final float _dotsPerPoint
    • _pdfDoc

      private com.lowagie.text.Document _pdfDoc
    • _writer

      private com.lowagie.text.pdf.PdfWriter _writer
    • _pdfEncryption

      private PDFEncryption _pdfEncryption
    • _pdfVersion

      private Character _pdfVersion
    • validPdfVersions

      private final char[] validPdfVersions
    • _pdfXConformance

      private Integer _pdfXConformance
    • _listener

      private PDFCreationListener _listener
    • _timeouted

      private boolean _timeouted
  • Constructor Details

  • Method Details

    • getDocument

      public Document getDocument()
    • getFontResolver

      public ITextFontResolver getFontResolver()
    • loadDocument

      private Document loadDocument(String uri)
    • fromUrl

      public static ITextRenderer fromUrl(String uri)
    • setDocument

      public void setDocument(Document doc)
    • setDocument

      public void setDocument(Document doc, @Nullable String url)
    • fromString

      public static ITextRenderer fromString(String content)
    • fromString

      public static ITextRenderer fromString(String content, @Nullable String baseUrl)
    • setDocumentFromString

      public final void setDocumentFromString(String content)
    • setDocumentFromString

      public final void setDocumentFromString(String content, @Nullable String baseUrl)
    • parse

      private Document parse(String content)
    • setDocument

      @Deprecated private void setDocument(Document doc, @Nullable String url, NamespaceHandler nsh)
      Deprecated.
    • getPDFEncryption

      public PDFEncryption getPDFEncryption()
    • setPDFEncryption

      public void setPDFEncryption(PDFEncryption pdfEncryption)
    • setPDFVersion

      public void setPDFVersion(char _v)
    • getPDFVersion

      public char getPDFVersion()
    • setPDFXConformance

      public void setPDFXConformance(int pdfXConformance)
    • getPDFXConformance

      public int getPDFXConformance()
    • layout

      public void layout()
    • getInitialExtents

      private Rectangle getInitialExtents(LayoutContext c)
    • newRenderingContext

      private RenderingContext newRenderingContext()
    • newLayoutContext

      private LayoutContext newLayoutContext()
    • createPDF

      public byte[] createPDF(Document source) throws com.lowagie.text.DocumentException
      Throws:
      com.lowagie.text.DocumentException
    • createPDF

      public void createPDF(Document source, OutputStream os) throws com.lowagie.text.DocumentException
      Throws:
      com.lowagie.text.DocumentException
    • createPDF

      public void createPDF(OutputStream os) throws com.lowagie.text.DocumentException
      Throws:
      com.lowagie.text.DocumentException
    • writeNextDocument

      public void writeNextDocument()
    • writeNextDocument

      public void writeNextDocument(int initialPageNo)
    • finishPDF

      public void finishPDF()
    • createPDF

      public void createPDF(OutputStream os, boolean finish) throws com.lowagie.text.DocumentException
      Throws:
      com.lowagie.text.DocumentException
    • createPDF

      public void createPDF(OutputStream os, boolean finish, int initialPageNo) throws com.lowagie.text.DocumentException
      NOTE: Caller is responsible for cleaning up the OutputStream if something goes wrong.
      Throws:
      com.lowagie.text.DocumentException
    • firePreOpen

      private void firePreOpen()
    • firePreWrite

      private void firePreWrite(int pageCount)
    • fireOnClose

      private void fireOnClose()
    • writePDF

      private void writePDF(List<PageBox> pages, RenderingContext c, com.lowagie.text.Rectangle firstPageSize, com.lowagie.text.Document doc, com.lowagie.text.pdf.PdfWriter writer)
    • setDidValues

      private void setDidValues(com.lowagie.text.Document doc)
    • paintPage

      private void paintPage(RenderingContext c, com.lowagie.text.pdf.PdfWriter writer, PageBox page)
    • provideMetadataToPage

      private void provideMetadataToPage(com.lowagie.text.pdf.PdfWriter writer, PageBox page)
    • stringifyMetadata

      private String stringifyMetadata(Element element)
    • getFirstChildElement

      private static Element getFirstChildElement(Element element)
    • createXPacket

      private String createXPacket(String metadata)
    • getOutputDevice

      public ITextOutputDevice getOutputDevice()
    • getSharedContext

      public SharedContext getSharedContext()
    • exportText

      public void exportText(Writer writer) throws IOException
      Throws:
      IOException
    • getRootBox

      public BlockBox getRootBox()
    • getDotsPerPoint

      public float getDotsPerPoint()
    • findPagePositionsByID

      public List<PagePosition> findPagePositionsByID(Pattern pattern)
    • getListener

      public PDFCreationListener getListener()
    • setListener

      public void setListener(PDFCreationListener listener)
    • getWriter

      public com.lowagie.text.pdf.PdfWriter getWriter()
    • setTimeouted

      public void setTimeouted(boolean timeouted)
    • isTimeouted

      public boolean isTimeouted()