public class Type3FontValidator extends FontValidator<Type3Container>
Modifier and Type | Field and Description |
---|---|
protected COSDocument |
cosDocument |
protected PDType3Font |
font |
protected COSDictionary |
fontDictionary |
context, descriptorHelper, fontContainer
Constructor and Description |
---|
Type3FontValidator(PreflightContext context,
PDType3Font font) |
Modifier and Type | Method and Description |
---|---|
private void |
checkCharProcsAndMetrics()
CharProcs is a dictionary where the key is a character name and the value is a Stream which contains the glyph
representation of the key.
|
protected void |
checkEncoding()
For a Type3 font, the mapping between the Character Code and the
Character name is entirely defined in the /Encoding entry.
|
private void |
checkEncodingAsDictionary(COSDictionary encodingDictionary)
This method is called by the CheckEncoding method if the /Encoding entry
is an instance of COSDictionary.
|
private void |
checkEncodingAsString(java.lang.String enc)
This method is called by the CheckEncoding method if the /Encoding entry is a String.
|
private void |
checkFontBBox()
Check that the FontBBox element has the right format as declared in the
PDF reference document.
|
private void |
checkFontMatrix()
Check that the FontMatrix element has the right format as declared in the PDF reference document.
|
protected void |
checkMandatoryField() |
private void |
checkResources()
If the Resources entry is present, this method checks its content.
|
private PDType3CharProc |
getCharProc(int code) |
private float |
getWidthFromCharProc(PDType3CharProc charProc)
Parse the Glyph description to obtain the Width
|
java.util.List<java.lang.Float> |
getWidths(PDFont font) |
void |
validate() |
checkToUnicode, getFontContainer
protected PDType3Font font
protected COSDictionary fontDictionary
protected COSDocument cosDocument
public Type3FontValidator(PreflightContext context, PDType3Font font)
public void validate() throws ValidationException
validate
in class FontValidator<Type3Container>
ValidationException
protected void checkMandatoryField()
private void checkFontBBox()
private void checkFontMatrix()
protected void checkEncoding()
checkEncoding
in class FontValidator<Type3Container>
private void checkEncodingAsString(java.lang.String enc)
enc
- The name of the encoding.private void checkEncodingAsDictionary(COSDictionary encodingDictionary)
encodingDictionary
- the encoding dictionary.private void checkCharProcsAndMetrics() throws ValidationException
ValidationException
public java.util.List<java.lang.Float> getWidths(PDFont font)
private PDType3CharProc getCharProc(int code) throws ValidationException
ValidationException
private float getWidthFromCharProc(PDType3CharProc charProc) throws java.io.IOException
java.io.IOException
private void checkResources() throws ValidationException
ValidationException