Index: pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
===================================================================
--- pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java	(revision 1601819)
+++ pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java	(working copy)
@@ -24,6 +24,7 @@
 import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.common.PDRectangle;
+import org.apache.pdfbox.util.PDFStreamEngineExceptionHandler;
 
 /**
  * Renders a PDF document to an AWT BufferedImage.
@@ -35,6 +36,7 @@
 public class PDFRenderer
 {
     protected final PDDocument document;
+    private PDFStreamEngineExceptionHandler exceptionHandler;
     // TODO keep rendering state such as caches here
 
     private boolean clearResourcesAutomatically;
@@ -224,6 +226,10 @@
         }
 
         PageDrawer drawer = new PageDrawer(this);   // TODO: need to make it easy to use a custom PageDrawer
+        if(exceptionHandler != null)
+        {
+            drawer.setExceptionHandler(exceptionHandler);
+        }
         drawer.drawPage(graphics, page, cropBox);
         drawer.dispose();
         if (clearResourcesAutomatically)
@@ -231,4 +237,24 @@
             page.clear();
         }
     }
+
+
+    /**
+     * Get the currently configured exception handler
+     * 
+     * @return Returns currently configured exception handler
+     **/
+    public PDFStreamEngineExceptionHandler getExceptionHandler()
+    {
+        return exceptionHandler;
+    }
+
+    /**
+     * Set an exception handler 
+     * @param exceptionHandler The exception handler to set
+     **/
+    public void setExceptionHandler(PDFStreamEngineExceptionHandler exceptionHandler)
+    {
+        this.exceptionHandler = exceptionHandler;
+    }
 }
Index: pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java
===================================================================
--- pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java	(revision 1601819)
+++ pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java	(working copy)
@@ -77,6 +77,16 @@
 
     // skip malformed or otherwise unparseable input where possible
     private boolean forceParsing;
+    
+    private PDFStreamEngineExceptionHandler exceptionHandler = new PDFStreamEngineExceptionHandler()
+    {
+        
+        @Override
+        public void handleException(Exception e)
+        {
+            LOG.warn(e, e);
+        }
+    };
 
     /**
      * Creates a new PDFStreamEngine.
@@ -539,7 +549,10 @@
         }
         catch (Exception e)
         {
-            LOG.warn(e, e);
+            if(exceptionHandler != null)
+            {
+                exceptionHandler.handleException(e);
+            }
         }
     }
 
@@ -747,4 +760,23 @@
         }
     }
 
+    /**
+     * Get the currently configured exception handler
+     * 
+     * @return Returns currently configured exception handler
+     **/
+    public PDFStreamEngineExceptionHandler getExceptionHandler()
+    {
+        return exceptionHandler;
+    }
+
+    /**
+     * Set an exception handler 
+     * @param exceptionHandler The exception handler to set
+     **/
+    public void setExceptionHandler(PDFStreamEngineExceptionHandler exceptionHandler)
+    {
+        this.exceptionHandler = exceptionHandler;
+    }
+    
 }
Index: pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngineExceptionHandler.java
===================================================================
--- pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngineExceptionHandler.java	(revision 0)
+++ pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngineExceptionHandler.java	(working copy)
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pdfbox.util;
+
+/**
+ * Callback interface which gets called if an exception happens
+ * while processing a PDF operator in {@link PDFStreamEngine}
+ *
+ * @author Petr Slaby, kühn & weyh Software, GmbH
+ **/
+public interface PDFStreamEngineExceptionHandler
+{
+
+    /**
+     * Handle an exception that happened while processing a PDF operator.
+     * The implementors of the interface can log the exception to their
+     * own log system and/or throw a runtime exception to abort the processing
+     * of the PDF file.
+     * 
+     * @param e The original exception
+     **/
+    public void handleException(Exception e);
+}
