Package org.apache.pdfbox.pdmodel.font
Class PDType1FontEmbedder
java.lang.Object
org.apache.pdfbox.pdmodel.font.PDType1FontEmbedder
Embedded PDType1Font builder. Helper class to populate a PDType1Font from a PFB and AFM.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPDType1FontEmbedder
(PDDocument doc, COSDictionary dict, InputStream pfbStream, Encoding encoding) This will load a PFB to be embedded into a document. -
Method Summary
Modifier and TypeMethodDescription(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.Returns the font's encoding.Returns the font's glyph list.Returns the Type 1 font.
-
Field Details
-
fontEncoding
-
type1
-
-
Constructor Details
-
PDType1FontEmbedder
PDType1FontEmbedder(PDDocument doc, COSDictionary dict, InputStream pfbStream, Encoding encoding) throws 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:
IOException
- If there is an error loading the data.
-
-
Method Details
-
buildFontDescriptor
Returns a PDFontDescriptor for the given PFB. -
buildFontDescriptor
Returns a PDFontDescriptor for the given AFM. Used only for Standard 14 fonts.- Parameters:
metrics
- AFM
-
getFontEncoding
Returns the font's encoding. -
getGlyphList
Returns the font's glyph list. -
getType1Font
Returns the Type 1 font.
-