Class ExtractTTFFonts


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

      Fields 
      Modifier and Type Field Description
      private static java.lang.String ADDKEY  
      private int fontCounter  
      private static java.lang.String PASSWORD  
      private static java.lang.String PREFIX  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ExtractTTFFonts()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void extractFonts​(java.lang.String[] args)  
      private java.lang.String getUniqueFileName​(java.lang.String prefix, java.lang.String suffix)  
      static void main​(java.lang.String[] args)
      This is the entry point for the application.
      private void processResources​(PDResources resources, java.lang.String prefix, boolean addKey)  
      private static void usage()
      This will print the usage requirements and exit.
      private void writeFont​(PDFontDescriptor fd, java.lang.String name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • 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.