Class ExtractTTFFonts


  • public final class ExtractTTFFonts
    extends java.lang.Object
    This will extract all true type-fonts of a pdf.
    • Constructor Detail

      • ExtractTTFFonts

        private ExtractTTFFonts()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        This is the entry point for the application.
        Parameters:
        args - The command-line arguments.
        Throws:
        java.io.IOException - If there is an error decrypting the document.
      • extractFonts

        private void extractFonts​(java.lang.String[] args)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • processResources

        private void processResources​(PDResources resources,
                                      java.lang.String prefix,
                                      boolean addKey)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • processResourcesFonts

        private void processResourcesFonts​(PDResources resources,
                                           boolean addKey,
                                           java.lang.String prefix)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • processNestedResources

        private void processNestedResources​(PDResources resources,
                                            java.lang.String prefix,
                                            boolean addKey)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • writeFont

        private void writeFont​(PDFontDescriptor fd,
                               java.lang.String name)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getUniqueFileName

        private java.lang.String getUniqueFileName​(java.lang.String prefix,
                                                   java.lang.String suffix)
      • usage

        private static void usage()
        This will print the usage requirements and exit.