Class FontDescriptorHelper<T extends FontContainer>

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkFontFileMetaData​(org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor, org.apache.pdfbox.pdmodel.common.PDStream fontFile)
      Type0, Type1 and TrueType FontValidator call this method to check the FontFile meta data.
      protected boolean checkMandatoryFields​(org.apache.pdfbox.cos.COSDictionary fDescriptor)  
      abstract org.apache.pdfbox.pdmodel.common.PDStream extractFontFile​(org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor)  
      protected boolean fontFileNotEmbedded​(org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor)  
      protected byte[] getMetaDataStreamAsBytes​(org.apache.pdfbox.pdmodel.common.PDMetadata metadata)  
      protected boolean hasOnlyOneFontFile​(org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor)
      Return true if the FontDescriptor has only one FontFile entry.
      static boolean isSubSet​(java.lang.String fontName)  
      protected abstract void processFontFile​(org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor, org.apache.pdfbox.pdmodel.common.PDStream fontFile)  
      void validate()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • font

        protected org.apache.pdfbox.pdmodel.font.PDFontLike font
      • fontDescriptor

        protected org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor
    • Constructor Detail

      • FontDescriptorHelper

        public FontDescriptorHelper​(PreflightContext context,
                                    org.apache.pdfbox.pdmodel.font.PDFontLike font,
                                    T fontContainer)
    • Method Detail

      • validate

        public void validate()
      • checkMandatoryFields

        protected boolean checkMandatoryFields​(org.apache.pdfbox.cos.COSDictionary fDescriptor)
      • extractFontFile

        public abstract org.apache.pdfbox.pdmodel.common.PDStream extractFontFile​(org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor)
      • hasOnlyOneFontFile

        protected boolean hasOnlyOneFontFile​(org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor)
        Return true if the FontDescriptor has only one FontFile entry.
        Parameters:
        fontDescriptor -
        Returns:
        true if the FontDescriptor has only one FontFile entry.
      • fontFileNotEmbedded

        protected boolean fontFileNotEmbedded​(org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor)
      • processFontFile

        protected abstract void processFontFile​(org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor,
                                                org.apache.pdfbox.pdmodel.common.PDStream fontFile)
      • checkFontFileMetaData

        protected void checkFontFileMetaData​(org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor,
                                             org.apache.pdfbox.pdmodel.common.PDStream fontFile)
        Type0, Type1 and TrueType FontValidator call this method to check the FontFile meta data.
        Parameters:
        fontDescriptor - The FontDescriptor which contains the FontFile stream
        fontFile - The font file stream to check
      • getMetaDataStreamAsBytes

        protected final byte[] getMetaDataStreamAsBytes​(org.apache.pdfbox.pdmodel.common.PDMetadata metadata)
      • isSubSet

        public static boolean isSubSet​(java.lang.String fontName)