Package 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 Description DescendantFontValidator(PreflightContext context, PDCIDFont font, T fContainer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckCIDSystemInfo(COSDictionary sysinfo)Check the content of the CIDSystemInfo dictionary.protected abstract voidcheckCIDToGIDMap(COSBase ctog)This method checks the CIDtoGIDMap entry of the Font dictionary.protected voidcheckCIDToGIDMap(COSBase ctog, boolean mandatory)This method checks the CIDtoGIDMap entry of the Font dictionary.protected voidcheckMandatoryField()-
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
-
-
-
-
Constructor Detail
-
DescendantFontValidator
public DescendantFontValidator(PreflightContext context, PDCIDFont font, T fContainer)
-
-
Method Detail
-
checkMandatoryField
protected void checkMandatoryField()
- Overrides:
checkMandatoryFieldin classSimpleFontValidator<T extends FontContainer>
-
checkCIDSystemInfo
protected void checkCIDSystemInfo(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(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(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
-
-