Package com.reportmill.pdf
Class PDFText
- java.lang.Object
-
- com.reportmill.pdf.PDFText
-
public class PDFText extends java.lang.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.).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PDFText.FontEntry
An inner class to store font info.
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String[]
_pdfBuiltIns
Holds a list of all the PDF built in font name variants.protected static java.lang.String[]
_pdfBuiltIns2
Holds a list of all the PDF build font names.
-
Constructor Summary
Constructors Constructor Description PDFText()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PDFStream
charProcStreamForChar(RMFontFile fontFile, char aChar)
Returns a pdf stream buffer with given char written as a char proc.static void
writeExtendedFont(RMFont aFont, PDFFile pdfFile, int fontCharSet)
Writes the given font char set to the given pdf file.static void
writeFont(RMFont aFont, PDFFile pdfFile)
Writes the given font to the given pdf file.static void
writeText(RMText aText, PDFFile pdfFile, PDFPageBuffer aBuffer)
Writes PDF for given RMText.
-
-
-
Method Detail
-
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.
-
-