org.apache.pdfbox.preflight.font

## Class DescendantFontValidator<T extends FontContainer>

- java.lang.Object
- - org.apache.pdfbox.preflight.font.FontValidator<T>
  - - org.apache.pdfbox.preflight.font.SimpleFontValidator<T>
    - - org.apache.pdfbox.preflight.font.DescendantFontValidator<T>

Direct Known Subclasses:
  CIDType0FontValidator, CIDType2FontValidator

    public abstract class DescendantFontValidator<T extends FontContainer>
    extends SimpleFontValidator<T>

### Field Summary

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

`font, fontDictionary`

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

`context, descriptorHelper, fontContainer`

### Constructor Summary

Constructors
Constructor and Description
`DescendantFontValidator(PreflightContext context, org.apache.pdfbox.pdmodel.font.PDCIDFont font, T fContainer)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected void` `checkCIDSystemInfo(org.apache.pdfbox.cos.COSDictionary sysinfo)` Check the content of the CIDSystemInfo dictionary.
`protected abstract void` `checkCIDToGIDMap(org.apache.pdfbox.cos.COSBase ctog)` This method checks the CIDtoGIDMap entry of the Font dictionary.
`protected void` `checkCIDToGIDMap(org.apache.pdfbox.cos.COSBase ctog, boolean mandatory)` This method checks the CIDtoGIDMap entry of the Font dictionary.
`protected void` `checkMandatoryField()`

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

`createFontDescriptorHelper, processFontDescriptorValidation, validate`

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

`checkEncoding, checkToUnicode, getFontContainer`

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

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

### Constructor Detail

#### DescendantFontValidator

    public DescendantFontValidator(PreflightContext context,
                                   org.apache.pdfbox.pdmodel.font.PDCIDFont font,
                                   T fContainer)

### Method Detail

#### checkMandatoryField

    protected void checkMandatoryField()

Overrides:
  `checkMandatoryField` in class `SimpleFontValidator<T extends FontContainer>`

#### checkCIDSystemInfo

    protected void checkCIDSystemInfo(org.apache.pdfbox.cos.COSDictionary sysinfo)

Check the content of the CIDSystemInfo dictionary. A CIDSystemInfo dictionary must contain :

- a Name - Registry
- a Name - Ordering
- a Integer - Supplement

Parameters:
  `sysinfo` -

#### checkCIDToGIDMap

    protected abstract void checkCIDToGIDMap(org.apache.pdfbox.cos.COSBase ctog)

This method checks the CIDtoGIDMap entry of the Font dictionary. call the checkCIDToGIDMap(COSBase, boolean) with right parameters according to the instance of DescendantFontValidator

Parameters:
  `ctog` -

#### checkCIDToGIDMap

    protected void checkCIDToGIDMap(org.apache.pdfbox.cos.COSBase ctog,
                                    boolean mandatory)

This method checks the CIDtoGIDMap entry of the Font dictionary. This element must be a Stream or a Name. If it is a name, it must be "Identity" otherwise, the PDF file isn't a PDF/A-1b. If the validation fails the list of errors in the FontContainer is updated. If the CIDtoGIDMap is a Stream, it is parsed as a CMap and the result is returned.

Parameters:
  `ctog` -
  `mandatory` - true for CIDType2 , false for CIDType0