Index: pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFontFactory.java
===================================================================
--- pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFontFactory.java	(revision 1033990)
+++ pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFontFactory.java	(working copy)
@@ -33,6 +33,23 @@
  */
 public class PDFontFactory
 {
+    private final static int DEFAULT_FONT_CACHE_UPPER_LIMIT = 100;
+    
+    private static final int fontCacheUpperLimit;
+        
+    static
+    {        
+        int limit = DEFAULT_FONT_CACHE_UPPER_LIMIT;
+
+        String value = System.getProperty(PDFontFactory.class.getSimpleName().toLowerCase());
+        
+        if (value != null) {
+            limit = Integer.parseInt(value);
+        }
+        
+        fontCacheUpperLimit = limit;
+    }
+    
     /**
      * private constructor, should only use static methods in this class.
      */
@@ -74,7 +91,10 @@
             else 
             {
                 retval = PDFontFactory.createFont( dic );
-                fontCache.put(fontKey, retval);
+                
+                if (fontCache.size() < fontCacheUpperLimit) {
+                    fontCache.put(fontKey, retval);
+                }
             }
         }
         else

