Class PDFText

java.lang.Object
com.reportmill.pdf.PDFText

public class PDFText extends Object
This class generates PDF for an RMText. This would be a simple matter of using the PDF set-font and show-text operators, except that we need to embed PDF type3 fonts (really char paths) for all chars printed in non-standard fonts. We do this by tracking used chars in the PDFText.FontEntry class. Used chars in the ASCII range (0-255) make up a base font "Font0", while chars beyond 255 get written out as separate PDF fonts for each block of 256 ("Font0.1", "Font0.2", etc.).
  • Field Details

    • _pdfBuiltIns

      protected static final String[] _pdfBuiltIns
      Holds a list of all the PDF built in font name variants.
    • _pdfBuiltIns2

      protected static final String[] _pdfBuiltIns2
      Holds a list of all the PDF build font names.
  • Constructor Details

    • PDFText

      public PDFText()
  • Method Details

    • writeText

      public static void writeText(RMText aText, PDFFile pdfFile, PDFPageBuffer aBuffer)
      Writes PDF for given RMText.
    • writeFont

      public static void writeFont(RMFont aFont, PDFFile pdfFile)
      Writes the given font to the given pdf file.
    • writeExtendedFont

      public static void writeExtendedFont(RMFont aFont, PDFFile pdfFile, int fontCharSet)
      Writes the given font char set to the given pdf file.
    • charProcStreamForChar

      public static PDFStream charProcStreamForChar(RMFontFile fontFile, char aChar)
      Returns a pdf stream buffer with given char written as a char proc.