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
FieldsFields 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
ConstructorsConstructorDescriptionDescendantFontValidator
(PreflightContext context, PDCIDFont font, T fContainer) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkCIDSystemInfo
(COSBase sysinfo) Check the content of the CIDSystemInfo dictionary.protected abstract void
checkCIDToGIDMap
(COSBase ctog) This method checks the CIDtoGIDMap entry of the Font dictionary.protected void
checkCIDToGIDMap
(COSBase ctog, boolean mandatory) This method checks the CIDtoGIDMap entry of the Font dictionary.protected void
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
-
Field Details
-
cosDocument
-
-
Constructor Details
-
DescendantFontValidator
-
-
Method Details
-
checkMandatoryField
protected void checkMandatoryField()- Overrides:
checkMandatoryField
in classSimpleFontValidator<T extends FontContainer>
-
checkCIDSystemInfo
Check the content of the CIDSystemInfo dictionary. A CIDSystemInfo dictionary must contain :- a Name - Registry
- a Name - Ordering
- a Integer - Supplement
- Parameters:
sysinfo
-
-
checkCIDToGIDMap
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
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
-