org.apache.pdfbox.preflight.font

## Class Type3FontValidator

- java.lang.Object
- - org.apache.pdfbox.preflight.font.FontValidator<Type3Container>
  - - org.apache.pdfbox.preflight.font.Type3FontValidator

    public class Type3FontValidator
    extends FontValidator<Type3Container>

### Field Summary

Fields
`protected org.apache.pdfbox.cos.COSDocument` `cosDocument`
`protected org.apache.pdfbox.pdmodel.font.PDType3Font` `font`
`protected org.apache.pdfbox.cos.COSDictionary` `fontDictionary`

### Fields inherited from class org.apache.pdfbox.preflight.font.FontValidator

`context, descriptorHelper, fontContainer`

### Constructor Summary

Constructors
Constructor and Description
`Type3FontValidator(PreflightContext context, org.apache.pdfbox.pdmodel.font.PDType3Font font)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `checkEncoding()` For a Type3 font, the mapping between the Character Code and the Character name is entirely defined in the /Encoding entry.
`protected void` `checkMandatoryField()`
`List<Float>` `getWidths(org.apache.pdfbox.pdmodel.font.PDFont font)`
`void` `validate()`

### Methods inherited from class org.apache.pdfbox.preflight.font.FontValidator

`checkToUnicode, getFontContainer`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### font

    protected org.apache.pdfbox.pdmodel.font.PDType3Font font

#### fontDictionary

    protected org.apache.pdfbox.cos.COSDictionary fontDictionary

#### cosDocument

    protected org.apache.pdfbox.cos.COSDocument cosDocument

### Constructor Detail

#### Type3FontValidator

    public Type3FontValidator(PreflightContext context,
                              org.apache.pdfbox.pdmodel.font.PDType3Font font)

### Method Detail

#### validate

    public void validate()
                  throws ValidationException

Specified by:
  `validate` in class `FontValidator<Type3Container>`
Throws:
  `ValidationException`

#### checkMandatoryField

    protected void checkMandatoryField()

#### checkEncoding

    protected void checkEncoding()

For a Type3 font, the mapping between the Character Code and the Character name is entirely defined in the /Encoding entry. The /Encoding Entry can be a Name (For the 5 predefined encodings) or a dictionary. If it is a dictionary, the /Differences array contains the correspondence between a character code and a set of character name which are different from the encoding entry of the dictionary. This method checks that the encoding is :

- An existing encoding name.
- A dictionary with an existing encoding name (the name is optional) and a well formed "Differences" array (the array is optional)

Overrides:
  `checkEncoding` in class `FontValidator<Type3Container>`

#### getWidths

    public List<Float> getWidths(org.apache.pdfbox.pdmodel.font.PDFont font)