Class FontContainer<T extends org.apache.pdfbox.pdmodel.font.PDFontLike>
java.lang.Object
org.apache.pdfbox.preflight.font.container.FontContainer<T>
- Direct Known Subclasses:
CIDType0Container, CIDType2Container, TrueTypeContainer, Type0Container, Type1Container, Type3Container
public abstract class FontContainer<T extends org.apache.pdfbox.pdmodel.font.PDFontLike>
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanBoolean used to known if the font is embedded.protected final List<ValidationResult.ValidationError> List of validation errors that occur during the font validation.protected final TFont-like object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckGlyphWidth(int code) Check that the Width or W entry in the PDF matches the widths in the embedded font program.booleanprotected abstract booleanhasGlyph(int code) Checks if the embedded font contains a glyph for the given character code.booleanbooleanisValid()final voidmarkAsInvalid(int code, GlyphException e) final voidmarkAsValid(int code) voidvoidpush(List<ValidationResult.ValidationError> errors) voidvoidsetErrorsAlreadyMerged(boolean errorsAlreadyMerged)
-
Field Details
-
errorBuffer
List of validation errors that occur during the font validation. If the font is used by an object in the PDF, all these errors will be appended to the Error list of the PreflightContext. -
embeddedFont
protected boolean embeddedFontBoolean used to known if the font is embedded. -
font
Font-like object.
-
-
Constructor Details
-
FontContainer
-
-
Method Details
-
push
-
push
-
getAllErrors
-
isValid
public boolean isValid() -
errorsAleadyMerged
public boolean errorsAleadyMerged() -
setErrorsAlreadyMerged
public void setErrorsAlreadyMerged(boolean errorsAlreadyMerged) -
isEmbeddedFont
public boolean isEmbeddedFont() -
notEmbedded
public void notEmbedded() -
checkGlyphWidth
Check that the Width or W entry in the PDF matches the widths in the embedded font program.- Parameters:
code- character code- Throws:
GlyphException
-
hasGlyph
Checks if the embedded font contains a glyph for the given character code.- Parameters:
code- character code- Throws:
IOException
-
markAsValid
public final void markAsValid(int code) -
markAsInvalid
-