org.pdfbox.pdmodel.font

Class PDFontFactory


public class PDFontFactory
extends java.lang.Object

This will create the correct type of font based on information in the dictionary.
Version:
$Revision: 1.6 $
Author:
Ben Litchfield

Method Summary

static PDFont
createFont(COSDictionary dic)
This will create the correct font based on information in the dictionary.
static PDFont
createFont(COSDictionary dic, Map fontCache)
Create a font from the dictionary.

Method Details

createFont

public static PDFont createFont(COSDictionary dic)
            throws IOException
This will create the correct font based on information in the dictionary.
Parameters:
dic - The populated dictionary.
Returns:
The corrent implementation for the font.

createFont

public static PDFont createFont(COSDictionary dic,
                                Map fontCache)
            throws IOException
Create a font from the dictionary. Use the fontCache to get the existing object instead of creating it.
Parameters:
dic - The font dictionary.
fontCache - The font cache.
Returns:
The PDModel object for the cos dictionary.