Class FontDescriptorHelper<T extends FontContainer>
java.lang.Object
org.apache.pdfbox.preflight.font.descriptor.FontDescriptorHelper<T>
- Direct Known Subclasses:
CIDType0DescriptorHelper
,CIDType2DescriptorHelper
,TrueTypeDescriptorHelper
,Type1DescriptorHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PreflightContext
protected T
protected PDFontLike
protected PDFontDescriptor
-
Constructor Summary
ConstructorsConstructorDescriptionFontDescriptorHelper
(PreflightContext context, PDFontLike font, T fontContainer) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkFontFileMetaData
(PDFontDescriptor fontDescriptor, PDStream fontFile) Type0, Type1 and TrueType FontValidator call this method to check the FontFile meta data.protected boolean
checkMandatoryFields
(COSDictionary fDescriptor) abstract PDStream
extractFontFile
(PDFontDescriptor fontDescriptor) protected boolean
fontFileNotEmbedded
(PDFontDescriptor fontDescriptor) protected final byte[]
getMetaDataStreamAsBytes
(PDMetadata metadata) protected boolean
hasOnlyOneFontFile
(PDFontDescriptor fontDescriptor) Return true if the FontDescriptor has only one FontFile entry.static boolean
protected abstract void
processFontFile
(PDFontDescriptor fontDescriptor, PDStream fontFile) void
validate()
-
Field Details
-
fContainer
-
context
-
font
-
fontDescriptor
-
MANDATORYFIELDS
-
-
Constructor Details
-
FontDescriptorHelper
-
-
Method Details
-
validate
public void validate() -
checkMandatoryFields
-
extractFontFile
-
hasOnlyOneFontFile
Return true if the FontDescriptor has only one FontFile entry.- Parameters:
fontDescriptor
-- Returns:
- true if the FontDescriptor has only one FontFile entry.
-
fontFileNotEmbedded
-
processFontFile
-
checkFontFileMetaData
Type0, Type1 and TrueType FontValidator call this method to check the FontFile meta data.- Parameters:
fontDescriptor
- The FontDescriptor which contains the FontFile streamfontFile
- The font file stream to check
-
getMetaDataStreamAsBytes
-
isSubSet
-