Package org.apache.pdfbox.pdmodel.font
Class PDType1FontEmbedder
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.font.PDType1FontEmbedder
-
class PDType1FontEmbedder extends java.lang.Object
Embedded PDType1Font builder. Helper class to populate a PDType1Font from a PFB and AFM.
-
-
Field Summary
Fields Modifier and Type Field Description private Encoding
fontEncoding
private Type1Font
type1
-
Constructor Summary
Constructors Constructor Description PDType1FontEmbedder(PDDocument doc, COSDictionary dict, java.io.InputStream pfbStream, Encoding encoding)
This will load a PFB to be embedded into a document.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static PDFontDescriptor
buildFontDescriptor(FontMetrics metrics)
Returns a PDFontDescriptor for the given AFM.(package private) static PDFontDescriptor
buildFontDescriptor(Type1Font type1)
Returns a PDFontDescriptor for the given PFB.Encoding
getFontEncoding()
Returns the font's encoding.GlyphList
getGlyphList()
Returns the font's glyph list.Type1Font
getType1Font()
Returns the Type 1 font.
-
-
-
Constructor Detail
-
PDType1FontEmbedder
PDType1FontEmbedder(PDDocument doc, COSDictionary dict, java.io.InputStream pfbStream, Encoding encoding) throws java.io.IOException
This will load a PFB to be embedded into a document.- Parameters:
doc
- The PDF document that will hold the embedded font.dict
- The Font dictionary to write to.pfbStream
- The pfb input.- Throws:
java.io.IOException
- If there is an error loading the data.
-
-
Method Detail
-
buildFontDescriptor
static PDFontDescriptor buildFontDescriptor(Type1Font type1)
Returns a PDFontDescriptor for the given PFB.
-
buildFontDescriptor
static PDFontDescriptor buildFontDescriptor(FontMetrics metrics)
Returns a PDFontDescriptor for the given AFM. Used only for Standard 14 fonts.- Parameters:
metrics
- AFM
-
getFontEncoding
public Encoding getFontEncoding()
Returns the font's encoding.
-
getGlyphList
public GlyphList getGlyphList()
Returns the font's glyph list.
-
getType1Font
public Type1Font getType1Font()
Returns the Type 1 font.
-
-