Top Fields Constructors Methods
org.apache.pdfbox.preflight.font.descriptor

public abstract Class FontDescriptorHelper<T extends FontContainer<T extends PDFontLike>>

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.pdfbox.preflight.font.descriptor.TrueTypeDescriptorHelper, org.apache.pdfbox.preflight.font.descriptor.Type1DescriptorHelper, org.apache.pdfbox.preflight.font.descriptor.CIDType0DescriptorHelper, org.apache.pdfbox.preflight.font.descriptor.CIDType2DescriptorHelper
Static Imports
org.apache.pdfbox.preflight.PreflightConstants.ERROR_FONTS_DESCRIPTOR_INVALID, .PreflightConstants.ERROR_FONTS_FONT_FILEX_INVALID, .PreflightConstants.ERROR_METADATA_FORMAT, .PreflightConstants.ERROR_METADATA_FORMAT_STREAM, .PreflightConstants.ERROR_METADATA_FORMAT_UNKNOWN, .PreflightConstants.ERROR_METADATA_FORMAT_XPACKET, .PreflightConstants.ERROR_METADATA_UNKNOWN_VALUETYPE

Field Summary

Modifier and TypeField and Description
protected PreflightContext
protected T
protected PDFontLike
protected PDFontDescriptor
private static final Set<String>

Constructor Summary

AccessConstructor and Description
public
FontDescriptorHelper(PreflightContext context, PDFontLike font, T fontContainer)

Method Summary

Modifier and TypeMethod and Description
protected void
checkFontFileMetaData(PDFontDescriptor
The FontDescriptor which contains the FontFile stream
fontDescriptor
,
PDStream
The font file stream to check
fontFile
)

Type0, Type1 and TrueType FontValidator call this method to check the FontFile meta data.

protected boolean
public abstract PDStream
protected boolean
protected final byte[]
protected boolean

Returns:

true if the FontDescriptor has only one FontFile entry.
hasOnlyOneFontFile
(PDFontDescriptor fontDescriptor)

Return true if the FontDescriptor has only one FontFile entry.

public static boolean
isSubSet(String fontName)

protected abstract void
processFontFile(PDFontDescriptor fontDescriptor, PDStream fontFile)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
protected PreflightContext context
fontback to summary
protected PDFontLike font
fontDescriptorback to summary
protected PDFontDescriptor fontDescriptor
MANDATORYFIELDSback to summary
private static final Set<String> MANDATORYFIELDS

Constructor Detail

FontDescriptorHelperback to summary
public FontDescriptorHelper(PreflightContext context, PDFontLike font, T fontContainer)

Method Detail

checkFontFileMetaDataback to summary
protected void checkFontFileMetaData(PDFontDescriptor fontDescriptor, PDStream fontFile)

Type0, Type1 and TrueType FontValidator call this method to check the FontFile meta data.

Parameters
fontDescriptor:PDFontDescriptor

The FontDescriptor which contains the FontFile stream

fontFile:PDStream

The font file stream to check

checkMandatoryFieldsback to summary
protected boolean checkMandatoryFields(COSDictionary fDescriptor)
extractFontFileback to summary
public abstract PDStream extractFontFile(PDFontDescriptor fontDescriptor)
fontFileNotEmbeddedback to summary
protected boolean fontFileNotEmbedded(PDFontDescriptor fontDescriptor)
getMetaDataStreamAsBytesback to summary
protected final byte[] getMetaDataStreamAsBytes(PDMetadata metadata)
hasOnlyOneFontFileback to summary
protected boolean hasOnlyOneFontFile(PDFontDescriptor fontDescriptor)

Return true if the FontDescriptor has only one FontFile entry.

Returns:boolean

true if the FontDescriptor has only one FontFile entry.

isSubSetback to summary
public static boolean isSubSet(String fontName)
processFontFileback to summary
protected abstract void processFontFile(PDFontDescriptor fontDescriptor, PDStream fontFile)
validateback to summary
public void validate()