*/
protected void processDescendantFont() throws ValidationException
{
COSDictionary fontDictionary = (COSDictionary) font.getCOSObject();
// a CIDFont is contained in the DescendantFonts array
COSArray array = COSUtils.getAsArray(fontDictionary.getItem(COSName.DESCENDANT_FONTS), cosDocument);
if (array == null || array.size() != 1)
{
/*
* in PDF 1.4, this array must contain only one element, because of a PDF/A should be a PDF 1.4, this method
* returns an error if the array has more than one element.
*/
this.fontContainer.push(new ValidationError(ERROR_FONTS_CIDKEYED_INVALID,
"CIDFont is missing from the DescendantFonts array or the size of array is greater than 1"));
return;
}
COSDictionary cidFont = COSUtils.getAsDictionary(array.get(0), cosDocument);
if (cidFont == null)
{
this.fontContainer.push(new ValidationError(ERROR_FONTS_CIDKEYED_INVALID,
"The DescendantFonts array should have one element with is a dictionary."));
return;