pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1626070 [1/2] - in /pdfbox/trunk: examples/src/main/java/org/apache/pdfbox/examples/util/ pdfbox/src/main/java/org/apache/pdfbox/encoding/ pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/ pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fon...
Date Thu, 18 Sep 2014 20:14:19 GMT
Author: jahewson
Date: Thu Sep 18 20:14:17 2014
New Revision: 1626070

URL: http://svn.apache.org/r1626070
Log:
PDFBOX-2362: Remove .properties file usage in PDFStreamEngine

Added:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColorN.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColorN.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/LegacyFillNonZeroRule.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetFlatness.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetRenderingIntent.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetFontAndSize.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextHorizontalScaling.java
      - copied, changed from r1625710, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetHorizontalTextScaling.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowTextAdjusted.java
      - copied, changed from r1625710, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowTextGlyph.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowTextLine.java
      - copied, changed from r1625710, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveAndShow.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowTextLineAndSpace.java
      - copied, changed from r1625710, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetMoveAndShow.java
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/additional_glyphlist.properties
      - copied unchanged from r1625710, pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/additional_glyphlist.properties
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/glyphlist.properties
      - copied unchanged from r1625710, pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist.properties
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/zapf_dingbats.properties
      - copied unchanged from r1625710, pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/zapf_dingbats.properties
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/version.properties
      - copied unchanged from r1625710, pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/pdfbox.properties
Removed:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/ResourceLoader.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveAndShow.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetHorizontalTextScaling.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetMoveAndShow.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextFont.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowTextGlyph.java
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFGraphicsStreamEngine.properties
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFMarkedContentExtractor.properties
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFTextStripper.properties
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/additional_glyphlist.properties
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist.properties
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/pdfbox.properties
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/zapf_dingbats.properties
Modified:
    pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java
    pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/RemoveAllText.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/encoding/GlyphList.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/ContentStreamWriter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/CMapManager.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFGraphicsStreamEngine.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFMarkedContentExtractor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStreamEngine.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripper.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripperByArea.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/DrawObject.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/Operator.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/OperatorProcessor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColorSpace.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceCMYKColor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceGrayColor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceRGBColor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColorSpace.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceCMYKColor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceGrayColor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceRGBColor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/AppendRectangleToPath.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/BeginInlineImage.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClipEvenOddRule.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClipNonZeroRule.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseAndStrokePath.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseFillEvenOddAndStrokePath.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseFillNonZeroAndStrokePath.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClosePath.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveTo.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveToReplicateFinalPoint.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveToReplicateInitialPoint.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/DrawObject.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/EndPath.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillEvenOddAndStrokePath.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillEvenOddRule.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillNonZeroAndStrokePath.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillNonZeroRule.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/LineTo.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/MoveTo.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ShadingFill.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/StrokePath.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/BeginMarkedContentSequence.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/BeginMarkedContentSequenceWithProperties.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/EndMarkedContentSequence.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Concatenate.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Restore.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Save.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetGraphicsStateParameters.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineCapStyle.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineDashPattern.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineJoinStyle.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineMiterLimit.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineWidth.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetMatrix.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/BeginText.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/EndText.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveText.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveTextSetLeading.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/NextLine.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetCharSpacing.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextLeading.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextRenderingMode.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextRise.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetWordSpacing.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowText.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/edit/TestPDPageContentStream.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightContentStream.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/StubOperator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PreflightType3Stream.java

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java (original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java Thu Sep 18 20:14:17 2014
@@ -27,10 +27,9 @@ import org.apache.pdfbox.pdmodel.graphic
 import org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject;
 import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
 import org.apache.pdfbox.util.Matrix;
-import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.DrawObject;
 import org.apache.pdfbox.util.operator.Operator;
 import org.apache.pdfbox.util.PDFStreamEngine;
-import org.apache.pdfbox.util.ResourceLoader;
 
 import java.awt.geom.AffineTransform;
 import java.io.IOException;
@@ -38,6 +37,11 @@ import java.io.IOException;
 import java.util.List;
 import java.util.Map;
 import org.apache.pdfbox.pdmodel.encryption.StandardDecryptionMaterial;
+import org.apache.pdfbox.util.operator.state.Concatenate;
+import org.apache.pdfbox.util.operator.state.Restore;
+import org.apache.pdfbox.util.operator.state.Save;
+import org.apache.pdfbox.util.operator.state.SetGraphicsStateParameters;
+import org.apache.pdfbox.util.operator.state.SetMatrix;
 
 /**
  * This is an example on how to get the x/y coordinates of image locations.
@@ -49,8 +53,6 @@ import org.apache.pdfbox.pdmodel.encrypt
  */
 public class PrintImageLocations extends PDFStreamEngine
 {
-    
-    private static final String INVOKE_OPERATOR = "Do";
     /**
      * Default constructor.
      *
@@ -58,8 +60,12 @@ public class PrintImageLocations extends
      */
     public PrintImageLocations() throws IOException
     {
-        super( ResourceLoader.loadProperties(
-                "org/apache/pdfbox/resources/PDFTextStripper.properties", true ) );
+        addOperator(new Concatenate());
+        addOperator(new DrawObject());
+        addOperator(new SetGraphicsStateParameters());
+        addOperator(new Save());
+        addOperator(new Restore());
+        addOperator(new SetMatrix());
     }
 
     /**
@@ -124,8 +130,8 @@ public class PrintImageLocations extends
      */
     protected void processOperator( Operator operator, List arguments ) throws IOException
     {
-        String operation = operator.getOperation();
-        if( INVOKE_OPERATOR.equals(operation) )
+        String operation = operator.getName();
+        if( "Do".equals(operation) )
         {
             COSName objectName = (COSName)arguments.get( 0 );
             Map<String, PDXObject> xobjects = getResources().getXObjects();

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/RemoveAllText.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/RemoveAllText.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/RemoveAllText.java (original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/RemoveAllText.java Thu Sep 18 20:14:17 2014
@@ -23,7 +23,6 @@ import org.apache.pdfbox.pdmodel.PDDocum
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.common.PDStream;
 import org.apache.pdfbox.util.operator.Operator;
-import org.apache.pdfbox.util.operator.Operator;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -84,7 +83,7 @@ public class RemoveAllText
                         if( token instanceof Operator)
                         {
                             Operator op = (Operator)token;
-                            if( op.getOperation().equals( "TJ") || op.getOperation().equals( "Tj" ))
+                            if( op.getName().equals( "TJ") || op.getName().equals( "Tj" ))
                             {
                                 //remove the one argument to this operator
                                 newTokens.remove( newTokens.size() -1 );

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/encoding/GlyphList.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/encoding/GlyphList.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/encoding/GlyphList.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/encoding/GlyphList.java Thu Sep 18 20:14:17 2014
@@ -46,10 +46,10 @@ public class GlyphList
             DEFAULT = new GlyphList();
 
             // Loads the official glyph List based on adobes glyph list
-            DEFAULT.loadGlyphs("org/apache/pdfbox/resources/glyphlist.properties");
+            DEFAULT.loadGlyphs("org/apache/pdfbox/resources/glyphlist/glyphlist.properties");
 
             // Loads some additional glyph mappings
-            DEFAULT.loadGlyphs("org/apache/pdfbox/resources/additional_glyphlist.properties");
+            DEFAULT.loadGlyphs("org/apache/pdfbox/resources/glyphlist/additional_glyphlist.properties");
 
             // Load an external glyph list file that user can give as JVM property
             try
@@ -71,7 +71,7 @@ public class GlyphList
 
             // Zapf Dingbats has its own glyph list
             ZAPF_DINGBATS = new GlyphList();
-            ZAPF_DINGBATS.loadGlyphs("org/apache/pdfbox/resources/zapf_dingbats.properties");
+            ZAPF_DINGBATS.loadGlyphs("org/apache/pdfbox/resources/glyphlist/zapf_dingbats.properties");
         }
         catch (IOException e)
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/ContentStreamWriter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/ContentStreamWriter.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/ContentStreamWriter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/ContentStreamWriter.java Thu Sep 18 20:14:17 2014
@@ -136,7 +136,7 @@ public class ContentStreamWriter
         else if( o instanceof Operator)
         {
             Operator op = (Operator)o;
-            if( op.getOperation().equals( "BI" ) )
+            if( op.getName().equals( "BI" ) )
             {
                 output.write( "BI".getBytes("ISO-8859-1") );
                 COSDictionary dic = op.getImageParameters();
@@ -154,7 +154,7 @@ public class ContentStreamWriter
             }
             else
             {
-                output.write( op.getOperation().getBytes("ISO-8859-1") );
+                output.write( op.getName().getBytes("ISO-8859-1") );
                 output.write( EOL );
             }
         }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/CMapManager.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/CMapManager.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/CMapManager.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/CMapManager.java Thu Sep 18 20:14:17 2014
@@ -18,7 +18,6 @@ package org.apache.pdfbox.pdmodel.font;
 
 import org.apache.fontbox.cmap.CMap;
 import org.apache.fontbox.cmap.CMapParser;
-import org.apache.pdfbox.util.ResourceLoader;
 
 import java.io.IOException;
 import java.io.InputStream;

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFGraphicsStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFGraphicsStreamEngine.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFGraphicsStreamEngine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFGraphicsStreamEngine.java Thu Sep 18 20:14:17 2014
@@ -22,6 +22,68 @@ import org.apache.pdfbox.pdmodel.graphic
 
 import java.awt.geom.Point2D;
 import java.io.IOException;
+import org.apache.pdfbox.util.operator.color.SetNonStrokingColor;
+import org.apache.pdfbox.util.operator.color.SetNonStrokingColorN;
+import org.apache.pdfbox.util.operator.color.SetNonStrokingColorSpace;
+import org.apache.pdfbox.util.operator.color.SetNonStrokingDeviceCMYKColor;
+import org.apache.pdfbox.util.operator.color.SetNonStrokingDeviceGrayColor;
+import org.apache.pdfbox.util.operator.color.SetNonStrokingDeviceRGBColor;
+import org.apache.pdfbox.util.operator.color.SetStrokingColor;
+import org.apache.pdfbox.util.operator.color.SetStrokingColorN;
+import org.apache.pdfbox.util.operator.color.SetStrokingColorSpace;
+import org.apache.pdfbox.util.operator.color.SetStrokingDeviceCMYKColor;
+import org.apache.pdfbox.util.operator.color.SetStrokingDeviceGrayColor;
+import org.apache.pdfbox.util.operator.color.SetStrokingDeviceRGBColor;
+import org.apache.pdfbox.util.operator.graphics.AppendRectangleToPath;
+import org.apache.pdfbox.util.operator.graphics.BeginInlineImage;
+import org.apache.pdfbox.util.operator.graphics.ClipEvenOddRule;
+import org.apache.pdfbox.util.operator.graphics.ClipNonZeroRule;
+import org.apache.pdfbox.util.operator.graphics.CloseAndStrokePath;
+import org.apache.pdfbox.util.operator.graphics.CloseFillEvenOddAndStrokePath;
+import org.apache.pdfbox.util.operator.graphics.CloseFillNonZeroAndStrokePath;
+import org.apache.pdfbox.util.operator.graphics.ClosePath;
+import org.apache.pdfbox.util.operator.graphics.CurveTo;
+import org.apache.pdfbox.util.operator.graphics.CurveToReplicateFinalPoint;
+import org.apache.pdfbox.util.operator.graphics.CurveToReplicateInitialPoint;
+import org.apache.pdfbox.util.operator.graphics.DrawObject;
+import org.apache.pdfbox.util.operator.graphics.EndPath;
+import org.apache.pdfbox.util.operator.graphics.FillEvenOddAndStrokePath;
+import org.apache.pdfbox.util.operator.graphics.FillEvenOddRule;
+import org.apache.pdfbox.util.operator.graphics.FillNonZeroAndStrokePath;
+import org.apache.pdfbox.util.operator.graphics.FillNonZeroRule;
+import org.apache.pdfbox.util.operator.graphics.LegacyFillNonZeroRule;
+import org.apache.pdfbox.util.operator.graphics.LineTo;
+import org.apache.pdfbox.util.operator.graphics.MoveTo;
+import org.apache.pdfbox.util.operator.graphics.ShadingFill;
+import org.apache.pdfbox.util.operator.graphics.StrokePath;
+import org.apache.pdfbox.util.operator.state.Concatenate;
+import org.apache.pdfbox.util.operator.state.Restore;
+import org.apache.pdfbox.util.operator.state.Save;
+import org.apache.pdfbox.util.operator.state.SetFlatness;
+import org.apache.pdfbox.util.operator.state.SetGraphicsStateParameters;
+import org.apache.pdfbox.util.operator.state.SetLineCapStyle;
+import org.apache.pdfbox.util.operator.state.SetLineDashPattern;
+import org.apache.pdfbox.util.operator.state.SetLineJoinStyle;
+import org.apache.pdfbox.util.operator.state.SetLineMiterLimit;
+import org.apache.pdfbox.util.operator.state.SetLineWidth;
+import org.apache.pdfbox.util.operator.state.SetMatrix;
+import org.apache.pdfbox.util.operator.state.SetRenderingIntent;
+import org.apache.pdfbox.util.operator.text.BeginText;
+import org.apache.pdfbox.util.operator.text.EndText;
+import org.apache.pdfbox.util.operator.text.SetFontAndSize;
+import org.apache.pdfbox.util.operator.text.SetTextHorizontalScaling;
+import org.apache.pdfbox.util.operator.text.ShowTextAdjusted;
+import org.apache.pdfbox.util.operator.text.ShowTextLine;
+import org.apache.pdfbox.util.operator.text.ShowTextLineAndSpace;
+import org.apache.pdfbox.util.operator.text.MoveText;
+import org.apache.pdfbox.util.operator.text.MoveTextSetLeading;
+import org.apache.pdfbox.util.operator.text.NextLine;
+import org.apache.pdfbox.util.operator.text.SetCharSpacing;
+import org.apache.pdfbox.util.operator.text.SetTextLeading;
+import org.apache.pdfbox.util.operator.text.SetTextRenderingMode;
+import org.apache.pdfbox.util.operator.text.SetTextRise;
+import org.apache.pdfbox.util.operator.text.SetWordSpacing;
+import org.apache.pdfbox.util.operator.text.ShowText;
 
 /**
  * PDFStreamEngine subclass for advanced processing of graphics.
@@ -35,16 +97,74 @@ public abstract class PDFGraphicsStreamE
     private final PDPage page;
 
     /**
-     * Default constructor, loads properties from file.
-     *
-     * @throws java.io.IOException If there is an error loading properties from the file.
+     * Constructor.
      */
-    protected PDFGraphicsStreamEngine(PDPage page) throws IOException
+    protected PDFGraphicsStreamEngine(PDPage page)
     {
-        super(ResourceLoader
-                .loadProperties("org/apache/pdfbox/resources/PDFGraphicsStreamEngine.properties",
-                                true));
         this.page = page;
+
+        addOperator(new CloseFillNonZeroAndStrokePath());
+        addOperator(new FillNonZeroAndStrokePath());
+        addOperator(new CloseFillEvenOddAndStrokePath());
+        addOperator(new FillEvenOddAndStrokePath());
+        addOperator(new BeginInlineImage());
+        addOperator(new BeginText());
+        addOperator(new CurveTo());
+        addOperator(new Concatenate());
+        addOperator(new SetStrokingColorSpace());
+        addOperator(new SetNonStrokingColorSpace());
+        addOperator(new SetLineDashPattern());
+        addOperator(new DrawObject()); // special graphics version
+        addOperator(new EndText());
+        addOperator(new FillNonZeroRule());
+        addOperator(new LegacyFillNonZeroRule());
+        addOperator(new FillEvenOddRule());
+        addOperator(new SetStrokingDeviceGrayColor());
+        addOperator(new SetNonStrokingDeviceGrayColor());
+        addOperator(new SetGraphicsStateParameters());
+        addOperator(new ClosePath());
+        addOperator(new SetFlatness());
+        addOperator(new SetLineJoinStyle());
+        addOperator(new SetLineCapStyle());
+        addOperator(new SetStrokingDeviceCMYKColor());
+        addOperator(new SetNonStrokingDeviceCMYKColor());
+        addOperator(new LineTo());
+        addOperator(new MoveTo());
+        addOperator(new SetLineMiterLimit());
+        addOperator(new EndPath());
+        addOperator(new Save());
+        addOperator(new Restore());
+        addOperator(new AppendRectangleToPath());
+        addOperator(new SetStrokingDeviceRGBColor());
+        addOperator(new SetNonStrokingDeviceRGBColor());
+        addOperator(new SetRenderingIntent());
+        addOperator(new CloseAndStrokePath());
+        addOperator(new StrokePath());
+        addOperator(new SetStrokingColor());
+        addOperator(new SetNonStrokingColor());
+        addOperator(new SetStrokingColorN());
+        addOperator(new SetNonStrokingColorN());
+        addOperator(new ShadingFill());
+        addOperator(new NextLine());
+        addOperator(new SetCharSpacing());
+        addOperator(new MoveText());
+        addOperator(new MoveTextSetLeading());
+        addOperator(new SetFontAndSize());
+        addOperator(new ShowText());
+        addOperator(new ShowTextAdjusted());
+        addOperator(new SetTextLeading());
+        addOperator(new SetMatrix());
+        addOperator(new SetTextRenderingMode());
+        addOperator(new SetTextRise());
+        addOperator(new SetWordSpacing());
+        addOperator(new SetTextHorizontalScaling());
+        addOperator(new CurveToReplicateInitialPoint());
+        addOperator(new SetLineWidth());
+        addOperator(new ClipNonZeroRule());
+        addOperator(new ClipEvenOddRule());
+        addOperator(new CurveToReplicateFinalPoint());
+        addOperator(new ShowTextLine());
+        addOperator(new ShowTextLineAndSpace());
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFMarkedContentExtractor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFMarkedContentExtractor.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFMarkedContentExtractor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFMarkedContentExtractor.java Thu Sep 18 20:14:17 2014
@@ -16,12 +16,10 @@
  */
 package org.apache.pdfbox.util;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
 import java.util.Stack;
 
 import org.apache.pdfbox.cos.COSDictionary;
@@ -30,20 +28,21 @@ import org.apache.pdfbox.pdmodel.documen
 import org.apache.pdfbox.pdmodel.graphics.PDXObject;
 import org.apache.pdfbox.text.TextNormalize;
 import org.apache.pdfbox.text.TextPosition;
+import org.apache.pdfbox.util.operator.markedcontent.BeginMarkedContentSequence;
+import org.apache.pdfbox.util.operator.markedcontent.BeginMarkedContentSequenceWithProperties;
+import org.apache.pdfbox.util.operator.markedcontent.EndMarkedContentSequence;
 
 /**
  * This is an stream engine to extract the marked content of a pdf.
- * @author koch
- * @version $Revision$
+ *
+ * @author Johannes Koch
  */
 public class PDFMarkedContentExtractor extends PDFTextStreamEngine
 {
     private boolean suppressDuplicateOverlappingText = true;
     private List<PDMarkedContent> markedContents = new ArrayList<PDMarkedContent>();
     private Stack<PDMarkedContent> currentMarkedContents = new Stack<PDMarkedContent>();
-
-    private Map<String, List<TextPosition>> characterListMapping =
-        new HashMap<String, List<TextPosition>>();
+    private Map<String, List<TextPosition>> characterListMapping = new HashMap<String, List<TextPosition>>();
 
     /**
      * encoding that text will be written in (or null).
@@ -57,56 +56,31 @@ public class PDFMarkedContentExtractor e
     private TextNormalize normalize = null;
 
     /**
-     * Instantiate a new PDFTextStripper object. This object will load
-     * properties from PDFMarkedContentExtractor.properties and will not
-     * do anything special to convert the text to a more encoding-specific
-     * output.
-     *
-     * @throws IOException If there is an error loading the properties.
-     */
-    public PDFMarkedContentExtractor() throws IOException
-    {
-        super( ResourceLoader.loadProperties(
-                "org/apache/pdfbox/resources/PDFMarkedContentExtractor.properties", true ) );
-        this.outputEncoding = null;
-        this.normalize = new TextNormalize(this.outputEncoding);
-    }
-
-
-    /**
-     * Instantiate a new PDFTextStripper object.  Loading all of the operator mappings
-     * from the properties object that is passed in.  Does not convert the text
-     * to more encoding-specific output.
-     *
-     * @param props The properties containing the mapping of operators to PDFOperator
-     * classes.
-     *
-     * @throws IOException If there is an error reading the properties.
+     * Instantiate a new PDFTextStripper object. Will not do anything special to convert
+     * the text to a more encoding-specific output.
      */
-    public PDFMarkedContentExtractor( Properties props ) throws IOException
+    public PDFMarkedContentExtractor()
     {
-        super( props );
-        this.outputEncoding = null;
-        this.normalize = new TextNormalize(this.outputEncoding);
+        this(null);
     }
 
     /**
-     * Instantiate a new PDFTextStripper object. This object will load
-     * properties from PDFMarkedContentExtractor.properties and will apply
-     * encoding-specific conversions to the output text.
+     * Constructor. Will apply encoding-specific conversions to the output text.
      *
      * @param encoding The encoding that the output will be written in.
-     * @throws IOException If there is an error reading the properties.
      */
-    public PDFMarkedContentExtractor( String encoding ) throws IOException
+    public PDFMarkedContentExtractor(String encoding)
     {
-        super( ResourceLoader.loadProperties(
-                "org/apache/pdfbox/resources/PDFMarkedContentExtractor.properties", true ));
+        addOperator(new BeginMarkedContentSequenceWithProperties());
+        addOperator(new BeginMarkedContentSequence());
+        addOperator(new EndMarkedContentSequence());
+        // todo: DP - Marked Content Point
+        // todo: MP - Marked Content Point with Properties
+
         this.outputEncoding = encoding;
         this.normalize = new TextNormalize(this.outputEncoding);
     }
 
-
     /**
      * This will determine of two floating point numbers are within a specified variance.
      *
@@ -119,7 +93,6 @@ public class PDFMarkedContentExtractor e
         return second > first - variance && second < first + variance;
     }
 
-
     public void beginMarkedContentSequence(COSName tag, COSDictionary properties)
     {
         PDMarkedContent markedContent = PDMarkedContent.create(tag, properties);
@@ -155,7 +128,6 @@ public class PDFMarkedContentExtractor e
         }
     }
 
-
     /**
      * This will process a TextPosition object and add the
      * text to the list of characters on a page.  It takes care of
@@ -263,10 +235,8 @@ public class PDFMarkedContentExtractor e
         }
     }
 
-
     public List<PDMarkedContent> getMarkedContents()
     {
         return this.markedContents;
     }
-
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java Thu Sep 18 20:14:17 2014
@@ -23,14 +23,10 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
 import java.util.Stack;
 
 import org.apache.commons.logging.Log;
@@ -64,7 +60,6 @@ public class PDFStreamEngine
 {
     private static final Log LOG = LogFactory.getLog(PDFStreamEngine.class);
 
-    private final Set<String> unsupportedOperators = new HashSet<String>();
     private final Map<String, OperatorProcessor> operators = new HashMap<String, OperatorProcessor>();
 
     private Matrix textMatrix;
@@ -85,55 +80,6 @@ public class PDFStreamEngine
     }
 
     /**
-     * Constructor with engine properties. The property keys are all PDF operators, the values are
-     * class names used to execute those operators. An empty value means that the operator will be
-     * silently ignored.
-     * 
-     * @param properties The engine properties.
-     */
-    public PDFStreamEngine(Properties properties)
-    {
-        if (properties == null)
-        {
-            throw new NullPointerException("properties cannot be null");
-        }
-        Enumeration<?> names = properties.propertyNames();
-        for (Object name : Collections.list(names))
-        {
-            String operator = name.toString();
-            String processorClassName = properties.getProperty(operator);
-            if ("".equals(processorClassName))
-            {
-                unsupportedOperators.add(operator);
-            }
-            else
-            {
-                try
-                {
-                    Class<?> cls = Class.forName(processorClassName);
-                    OperatorProcessor processor = (OperatorProcessor) cls.newInstance();
-                    registerOperatorProcessor(operator, processor);
-                }
-                catch (ClassNotFoundException e)
-                {
-                    // should not happen
-                    throw new RuntimeException(e);
-                }
-                catch (InstantiationException e)
-                {
-                  // should not happen
-                  throw new RuntimeException(e);
-                }
-                catch (IllegalAccessException e)
-                {
-                  // should not happen
-                  throw new RuntimeException(e);
-                }
-            }
-        }
-    }
-
-    /**
      * Indicates if force parsing is activated.
      * 
      * @return true if force parsing is active
@@ -158,7 +104,9 @@ public class PDFStreamEngine
      * 
      * @param operator The operator as a string.
      * @param op Processor instance.
+     * @deprecated Use {@link #addOperator(OperatorProcessor)} instead
      */
+    @Deprecated
     public void registerOperatorProcessor(String operator, OperatorProcessor op)
     {
         op.setContext(this);
@@ -166,6 +114,17 @@ public class PDFStreamEngine
     }
 
     /**
+     * Adds an operator processor to the engine.
+     *
+     * @param op operator processor
+     */
+    public final void addOperator(OperatorProcessor op)
+    {
+        op.setContext(this);
+        operators.put(op.getName(), op);
+    }
+
+    /**
      * Initialises a stream for processing.
      *
      * @param drawingSize the size of the page
@@ -502,8 +461,8 @@ public class PDFStreamEngine
      */
     protected void processOperator(Operator operator, List<COSBase> arguments) throws IOException
     {
-        String operation = operator.getOperation();
-        OperatorProcessor processor = operators.get(operation);
+        String name = operator.getName();
+        OperatorProcessor processor = operators.get(name);
         if (processor != null)
         {
             processor.setContext(this);
@@ -511,18 +470,22 @@ public class PDFStreamEngine
         }
         else
         {
-            if (!unsupportedOperators.contains(operation))
-            {
-                if (LOG.isDebugEnabled())
-                {
-                    LOG.debug("unsupported/disabled operation: " + operation);
-                }
-                unsupportedOperators.add(operation);
-            }
+            unsupportedOperator(operator, arguments);
         }
     }
 
     /**
+     * Called when an unsupported operator is encountered.
+     *
+     * @param operator The unknown operator.
+     * @param arguments The list of arguments.
+     */
+    protected void unsupportedOperator(Operator operator, List<COSBase> arguments)
+    {
+        // overridden in subclasses
+    }
+
+    /**
      * @return Returns the XObjects.
      */
     public Map<String, PDXObject> getXObjects()

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStreamEngine.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStreamEngine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStreamEngine.java Thu Sep 18 20:14:17 2014
@@ -28,7 +28,28 @@ import org.apache.pdfbox.pdmodel.graphic
 import org.apache.pdfbox.text.TextPosition;
 
 import java.io.IOException;
-import java.util.Properties;
+import org.apache.pdfbox.util.operator.DrawObject;
+import org.apache.pdfbox.util.operator.state.Concatenate;
+import org.apache.pdfbox.util.operator.state.Restore;
+import org.apache.pdfbox.util.operator.state.Save;
+import org.apache.pdfbox.util.operator.state.SetGraphicsStateParameters;
+import org.apache.pdfbox.util.operator.state.SetMatrix;
+import org.apache.pdfbox.util.operator.text.BeginText;
+import org.apache.pdfbox.util.operator.text.EndText;
+import org.apache.pdfbox.util.operator.text.SetFontAndSize;
+import org.apache.pdfbox.util.operator.text.SetTextHorizontalScaling;
+import org.apache.pdfbox.util.operator.text.ShowTextAdjusted;
+import org.apache.pdfbox.util.operator.text.ShowTextLine;
+import org.apache.pdfbox.util.operator.text.ShowTextLineAndSpace;
+import org.apache.pdfbox.util.operator.text.MoveText;
+import org.apache.pdfbox.util.operator.text.MoveTextSetLeading;
+import org.apache.pdfbox.util.operator.text.NextLine;
+import org.apache.pdfbox.util.operator.text.SetCharSpacing;
+import org.apache.pdfbox.util.operator.text.SetTextLeading;
+import org.apache.pdfbox.util.operator.text.SetTextRenderingMode;
+import org.apache.pdfbox.util.operator.text.SetTextRise;
+import org.apache.pdfbox.util.operator.text.SetWordSpacing;
+import org.apache.pdfbox.util.operator.text.ShowText;
 
 /**
  * PDFStreamEngine subclass for advanced processing of text via TextPosition.
@@ -44,20 +65,33 @@ public class PDFTextStreamEngine extends
     private int pageRotation;
     private PDRectangle pageSize;
 
-    private PDFTextStreamEngine()
-    {
-    }
-
     /**
-     * Constructor with engine properties. The property keys are all PDF operators, the values are
-     * class names used to execute those operators. An empty value means that the operator will be
-     * silently ignored.
-     *
-     * @param properties The engine properties.
+     * Constructor.
      */
-    public PDFTextStreamEngine(Properties properties)
+    public PDFTextStreamEngine()
     {
-        super(properties);
+        addOperator(new BeginText());
+        addOperator(new Concatenate());
+        addOperator(new DrawObject()); // special text version
+        addOperator(new EndText());
+        addOperator(new SetGraphicsStateParameters());
+        addOperator(new Save());
+        addOperator(new Restore());
+        addOperator(new NextLine());
+        addOperator(new SetCharSpacing());
+        addOperator(new MoveText());
+        addOperator(new MoveTextSetLeading());
+        addOperator(new SetFontAndSize());
+        addOperator(new ShowText());
+        addOperator(new ShowTextAdjusted());
+        addOperator(new SetTextLeading());
+        addOperator(new SetMatrix());
+        addOperator(new SetTextRenderingMode());
+        addOperator(new SetTextRise());
+        addOperator(new SetWordSpacing());
+        addOperator(new SetTextHorizontalScaling());
+        addOperator(new ShowTextLine());
+        addOperator(new ShowTextLineAndSpace());
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripper.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripper.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripper.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripper.java Thu Sep 18 20:14:17 2014
@@ -180,40 +180,18 @@ public class PDFTextStripper extends PDF
     private boolean inParagraph;
 
     /**
-     * Instantiate a new PDFTextStripper object. This object will load
-     * properties from PDFTextStripper.properties and will not do
+     * Instantiate a new PDFTextStripper object. Will not do
      * anything special to convert the text to a more encoding-specific output.
      *
      * @throws IOException If there is an error loading the properties.
      */
     public PDFTextStripper() throws IOException
     {
-        super(ResourceLoader.loadProperties(
-                "org/apache/pdfbox/resources/PDFTextStripper.properties", true));
-        this.outputEncoding = null;
-        normalize = new TextNormalize(this.outputEncoding);
-    }
-
-    /**
-     * Instantiate a new PDFTextStripper object.  Loading all of the operator mappings
-     * from the properties object that is passed in.  Does not convert the text
-     * to more encoding-specific output.
-     *
-     * @param props The properties containing the mapping of operators to PDFOperator
-     * classes.
-     *
-     * @throws IOException If there is an error reading the properties.
-     */
-    public PDFTextStripper(Properties props) throws IOException
-    {
-        super(props);
-        this.outputEncoding = null;
-        normalize = new TextNormalize(this.outputEncoding);
+        this(null);
     }
 
     /**
-     * Instantiate a new PDFTextStripper object. This object will load
-     * properties from PDFTextStripper.properties and will apply
+     * Instantiate a new PDFTextStripper object. Will apply
      * encoding-specific conversions to the output text.
      *
      * @param encoding The encoding that the output will be written in.
@@ -221,8 +199,6 @@ public class PDFTextStripper extends PDF
      */
     public PDFTextStripper(String encoding) throws IOException
     {
-        super(ResourceLoader.loadProperties(
-                "org/apache/pdfbox/resources/PDFTextStripper.properties", true));
         this.outputEncoding = encoding;
         normalize = new TextNormalize(this.outputEncoding);
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripperByArea.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripperByArea.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripperByArea.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripperByArea.java Thu Sep 18 20:14:17 2014
@@ -24,7 +24,6 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
 import java.util.Vector;
 
 import org.apache.pdfbox.cos.COSStream;
@@ -55,27 +54,8 @@ public class PDFTextStripperByArea exten
         super();
     }
 
-        
     /**
-     * Instantiate a new PDFTextStripperArea object. Loading all of the operator
-     * mappings from the properties object that is passed in. Does not convert
-     * the text to more encoding-specific output.
-     * 
-     * @param props
-     *            The properties containing the mapping of operators to
-     *            PDFOperator classes.
-     * 
-     * @throws IOException
-     *             If there is an error reading the properties.
-     */
-    public PDFTextStripperByArea(Properties props) throws IOException
-    {
-        super(props);
-    }
-
-    /**
-     * Instantiate a new PDFTextStripperArea object. This object will load
-     * properties from PDFTextStripper.properties and will apply
+     * Instantiate a new PDFTextStripperArea object. Will apply
      * encoding-specific conversions to the output text.
      * 
      * @param encoding

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/DrawObject.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/DrawObject.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/DrawObject.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/DrawObject.java Thu Sep 18 20:14:17 2014
@@ -62,4 +62,10 @@ public class DrawObject extends Operator
             context.showForm(form);
         }
     }
+
+    @Override
+    public String getName()
+    {
+        return "Do";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/Operator.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/Operator.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/Operator.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/Operator.java Thu Sep 18 20:14:17 2014
@@ -82,11 +82,11 @@ public class Operator
     }
 
     /**
-     * This will get the operation that this operator represents.
+     * This will get the name of the operator.
      *
      * @return The string representation of the operation.
      */
-    public String getOperation()
+    public String getName()
     {
         return theOperator;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/OperatorProcessor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/OperatorProcessor.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/OperatorProcessor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/OperatorProcessor.java Thu Sep 18 20:14:17 2014
@@ -63,4 +63,9 @@ public abstract class OperatorProcessor
      * @throws IOException if the operator cannot be processed
      */
     public abstract void process(Operator operator, List<COSBase> operands) throws IOException;
+
+    /**
+     * Returns the name of this operator, e.g. "BI".
+     */
+    public abstract String getName();
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColor.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColor.java Thu Sep 18 20:14:17 2014
@@ -20,7 +20,7 @@ import org.apache.pdfbox.pdmodel.graphic
 import org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace;
 
 /**
- * sc,scn: Sets the colour to use for stroking non-stroking operations.
+ * sc: Sets the colour to use for stroking non-stroking operations.
  *
  * @author John Hewson
  */
@@ -52,4 +52,10 @@ public class SetNonStrokingColor extends
     {
         return context.getGraphicsState().getNonStrokingColorSpace();
     }
+
+    @Override
+    public String getName()
+    {
+        return "sc";
+    }
 }

Added: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColorN.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColorN.java?rev=1626070&view=auto
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColorN.java (added)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColorN.java Thu Sep 18 20:14:17 2014
@@ -0,0 +1,33 @@
+/*
+ * 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.operator.color;
+
+/**
+ * scn: Sets the colour to use for stroking non-stroking operations.
+ * Supports Pattern, Separation, DeviceN and ICCBased colour spaces.
+ *
+ * @author John Hewson
+ */
+public class SetNonStrokingColorN extends SetNonStrokingColor
+{
+    @Override
+    public String getName()
+    {
+        return "scn";
+    }
+}

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColorSpace.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColorSpace.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColorSpace.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingColorSpace.java Thu Sep 18 20:14:17 2014
@@ -56,4 +56,10 @@ public class SetNonStrokingColorSpace ex
             LOG.error("Missing color space: " + name.getName());
         }
     }
+
+    @Override
+    public String getName()
+    {
+        return "cs";
+    }
 }
\ No newline at end of file

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceCMYKColor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceCMYKColor.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceCMYKColor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceCMYKColor.java Thu Sep 18 20:14:17 2014
@@ -37,4 +37,10 @@ public class SetNonStrokingDeviceCMYKCol
         context.getGraphicsState().setNonStrokingColorSpace(PDDeviceCMYK.INSTANCE);
         super.process(operator, arguments);
     }
+
+    @Override
+    public String getName()
+    {
+        return "k";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceGrayColor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceGrayColor.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceGrayColor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceGrayColor.java Thu Sep 18 20:14:17 2014
@@ -37,4 +37,10 @@ public class SetNonStrokingDeviceGrayCol
         context.getGraphicsState().setNonStrokingColorSpace(PDDeviceGray.INSTANCE);
         super.process(operator, arguments);
     }
+
+    @Override
+    public String getName()
+    {
+        return "g";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceRGBColor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceRGBColor.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceRGBColor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetNonStrokingDeviceRGBColor.java Thu Sep 18 20:14:17 2014
@@ -37,4 +37,10 @@ public class SetNonStrokingDeviceRGBColo
         context.getGraphicsState().setNonStrokingColorSpace(PDDeviceRGB.INSTANCE);
         super.process(operator, arguments);
     }
+
+    @Override
+    public String getName()
+    {
+        return "rg";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColor.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColor.java Thu Sep 18 20:14:17 2014
@@ -20,7 +20,7 @@ import org.apache.pdfbox.pdmodel.graphic
 import org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace;
 
 /**
- * SC,SCN: Sets the colour to use for stroking stroking operations.
+ * SC: Sets the colour to use for stroking stroking operations.
  *
  * @author John Hewson
  */
@@ -52,4 +52,10 @@ public class SetStrokingColor extends Se
     {
         return context.getGraphicsState().getStrokingColorSpace();
     }
+
+    @Override
+    public String getName()
+    {
+        return "SC";
+    }
 }

Added: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColorN.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColorN.java?rev=1626070&view=auto
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColorN.java (added)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColorN.java Thu Sep 18 20:14:17 2014
@@ -0,0 +1,33 @@
+/*
+ * 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.operator.color;
+
+/**
+ * SCN: Sets the colour to use for stroking stroking operations.
+ * Supports Pattern, Separation, DeviceN and ICCBased colour spaces.
+ *
+ * @author John Hewson
+ */
+public class SetStrokingColorN extends SetStrokingColor
+{
+    @Override
+    public String getName()
+    {
+        return "SCN";
+    }
+}

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColorSpace.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColorSpace.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColorSpace.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingColorSpace.java Thu Sep 18 20:14:17 2014
@@ -56,4 +56,10 @@ public class SetStrokingColorSpace exten
             LOG.error("Missing color space: " + name.getName());
         }
     }
+
+    @Override
+    public String getName()
+    {
+        return "CS";
+    }
 }
\ No newline at end of file

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceCMYKColor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceCMYKColor.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceCMYKColor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceCMYKColor.java Thu Sep 18 20:14:17 2014
@@ -36,4 +36,10 @@ public class SetStrokingDeviceCMYKColor 
         context.getGraphicsState().setStrokingColorSpace(PDDeviceCMYK.INSTANCE);
         super.process(operator, arguments);
     }
+
+    @Override
+    public String getName()
+    {
+        return "K";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceGrayColor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceGrayColor.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceGrayColor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceGrayColor.java Thu Sep 18 20:14:17 2014
@@ -36,4 +36,10 @@ public class SetStrokingDeviceGrayColor 
         context.getGraphicsState().setStrokingColorSpace(PDDeviceGray.INSTANCE);
         super.process(operator, arguments);
     }
+
+    @Override
+    public String getName()
+    {
+        return "G";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceRGBColor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceRGBColor.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceRGBColor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/color/SetStrokingDeviceRGBColor.java Thu Sep 18 20:14:17 2014
@@ -43,4 +43,10 @@ public class SetStrokingDeviceRGBColor e
         context.getGraphicsState().setStrokingColorSpace(PDDeviceRGB.INSTANCE);
         super.process(operator, arguments);
     }
+
+    @Override
+    public String getName()
+    {
+        return "RG";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/AppendRectangleToPath.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/AppendRectangleToPath.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/AppendRectangleToPath.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/AppendRectangleToPath.java Thu Sep 18 20:14:17 2014
@@ -53,4 +53,10 @@ public final class AppendRectangleToPath
 
         context.appendRectangle(p0, p1, p2, p3);
     }
+
+    @Override
+    public String getName()
+    {
+        return "re";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/BeginInlineImage.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/BeginInlineImage.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/BeginInlineImage.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/BeginInlineImage.java Thu Sep 18 20:14:17 2014
@@ -39,4 +39,10 @@ public final class BeginInlineImage exte
                                           context.getResources().getColorSpaces());
         context.drawImage(image);
     }
+
+    @Override
+    public String getName()
+    {
+        return "BI";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClipEvenOddRule.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClipEvenOddRule.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClipEvenOddRule.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClipEvenOddRule.java Thu Sep 18 20:14:17 2014
@@ -35,4 +35,10 @@ public final class ClipEvenOddRule exten
     {
         context.clip(GeneralPath.WIND_EVEN_ODD);
     }
+
+    @Override
+    public String getName()
+    {
+        return "W*";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClipNonZeroRule.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClipNonZeroRule.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClipNonZeroRule.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClipNonZeroRule.java Thu Sep 18 20:14:17 2014
@@ -35,4 +35,10 @@ public class ClipNonZeroRule extends Gra
     {
         context.clip(GeneralPath.WIND_NON_ZERO);
     }
+
+    @Override
+    public String getName()
+    {
+        return "W";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseAndStrokePath.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseAndStrokePath.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseAndStrokePath.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseAndStrokePath.java Thu Sep 18 20:14:17 2014
@@ -36,4 +36,10 @@ public class CloseAndStrokePath extends 
         context.processOperator( "h", arguments );
         context.processOperator( "S", arguments );
     }
+
+    @Override
+    public String getName()
+    {
+        return "s";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseFillEvenOddAndStrokePath.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseFillEvenOddAndStrokePath.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseFillEvenOddAndStrokePath.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseFillEvenOddAndStrokePath.java Thu Sep 18 20:14:17 2014
@@ -36,4 +36,10 @@ public final class CloseFillEvenOddAndSt
         context.processOperator("h", operands);  // ClosePath
         context.processOperator("B*", operands); // FillEvenOddAndStroke
     }
+
+    @Override
+    public String getName()
+    {
+        return "F";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseFillNonZeroAndStrokePath.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseFillNonZeroAndStrokePath.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseFillNonZeroAndStrokePath.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CloseFillNonZeroAndStrokePath.java Thu Sep 18 20:14:17 2014
@@ -35,4 +35,10 @@ public final class CloseFillNonZeroAndSt
         context.processOperator("h", operands);  // ClosePath
         context.processOperator("B", operands);  // FillNonZeroAndStroke
     }
+
+    @Override
+    public String getName()
+    {
+        return "b";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClosePath.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClosePath.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClosePath.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ClosePath.java Thu Sep 18 20:14:17 2014
@@ -34,4 +34,10 @@ public final class ClosePath extends Gra
     {
         context.closePath();
     }
+
+    @Override
+    public String getName()
+    {
+        return "h";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveTo.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveTo.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveTo.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveTo.java Thu Sep 18 20:14:17 2014
@@ -49,4 +49,10 @@ public class CurveTo extends GraphicsOpe
                         (float) point2.getX(), (float) point2.getY(),
                         (float) point3.getX(), (float) point3.getY());
     }
+
+    @Override
+    public String getName()
+    {
+        return "c";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveToReplicateFinalPoint.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveToReplicateFinalPoint.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveToReplicateFinalPoint.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveToReplicateFinalPoint.java Thu Sep 18 20:14:17 2014
@@ -46,4 +46,10 @@ public final class CurveToReplicateFinal
                         (float) point3.getX(), (float) point3.getY(),
                         (float) point3.getX(), (float) point3.getY());
     }
+
+    @Override
+    public String getName()
+    {
+        return "y";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveToReplicateInitialPoint.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveToReplicateInitialPoint.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveToReplicateInitialPoint.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/CurveToReplicateInitialPoint.java Thu Sep 18 20:14:17 2014
@@ -48,4 +48,10 @@ public class CurveToReplicateInitialPoin
                         (float) point2.getX(), (float) point2.getY(),
                         (float) point3.getX(), (float) point3.getY());
     }
+
+    @Override
+    public String getName()
+    {
+        return "v";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/DrawObject.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/DrawObject.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/DrawObject.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/DrawObject.java Thu Sep 18 20:14:17 2014
@@ -108,4 +108,10 @@ public final class DrawObject extends Gr
             }
         }
     }
+
+    @Override
+    public String getName()
+    {
+        return "Do";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/EndPath.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/EndPath.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/EndPath.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/EndPath.java Thu Sep 18 20:14:17 2014
@@ -34,4 +34,10 @@ public final class EndPath extends Graph
     {
         context.endPath();
     }
+
+    @Override
+    public String getName()
+    {
+        return "n";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillEvenOddAndStrokePath.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillEvenOddAndStrokePath.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillEvenOddAndStrokePath.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillEvenOddAndStrokePath.java Thu Sep 18 20:14:17 2014
@@ -36,4 +36,10 @@ public final class FillEvenOddAndStrokeP
     {
         context.fillAndStrokePath(GeneralPath.WIND_EVEN_ODD);
     }
+
+    @Override
+    public String getName()
+    {
+        return "B*";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillEvenOddRule.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillEvenOddRule.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillEvenOddRule.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillEvenOddRule.java Thu Sep 18 20:14:17 2014
@@ -35,4 +35,10 @@ public final class FillEvenOddRule exten
     {
         context.fillPath(GeneralPath.WIND_EVEN_ODD);
     }
+
+    @Override
+    public String getName()
+    {
+        return "f*";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillNonZeroAndStrokePath.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillNonZeroAndStrokePath.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillNonZeroAndStrokePath.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillNonZeroAndStrokePath.java Thu Sep 18 20:14:17 2014
@@ -37,4 +37,10 @@ public class FillNonZeroAndStrokePath ex
     {
         context.fillAndStrokePath(GeneralPath.WIND_NON_ZERO);
     }
+
+    @Override
+    public String getName()
+    {
+        return "B";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillNonZeroRule.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillNonZeroRule.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillNonZeroRule.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/FillNonZeroRule.java Thu Sep 18 20:14:17 2014
@@ -24,15 +24,21 @@ import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.util.operator.Operator;
 
 /**
- * f,F Fill path using non zero winding rule.
+ * f Fill path using non zero winding rule.
  *
  * @author Ben Litchfield
  */
-public final class FillNonZeroRule extends GraphicsOperatorProcessor
+public class FillNonZeroRule extends GraphicsOperatorProcessor
 {
     @Override
-    public void process(Operator operator, List<COSBase> operands) throws IOException
+    public final void process(Operator operator, List<COSBase> operands) throws IOException
     {
         context.fillPath(GeneralPath.WIND_NON_ZERO);
     }
+
+    @Override
+    public String getName()
+    {
+        return "f";
+    }
 }

Added: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/LegacyFillNonZeroRule.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/LegacyFillNonZeroRule.java?rev=1626070&view=auto
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/LegacyFillNonZeroRule.java (added)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/LegacyFillNonZeroRule.java Thu Sep 18 20:14:17 2014
@@ -0,0 +1,32 @@
+/*
+ * 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.operator.graphics;
+
+/**
+ * F Fill path using non zero winding rule. Included only for compatibility with Acrobat.
+ *
+ * @author John Hewson
+ */
+public final class LegacyFillNonZeroRule extends FillNonZeroRule
+{
+    @Override
+    public String getName()
+    {
+        return "F";
+    }
+}

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/LineTo.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/LineTo.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/LineTo.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/LineTo.java Thu Sep 18 20:14:17 2014
@@ -41,4 +41,10 @@ public class LineTo extends GraphicsOper
         Point2D pos = context.transformedPoint(x.doubleValue(), y.doubleValue());
         context.lineTo((float) pos.getX(), (float) pos.getY());
     }
+
+    @Override
+    public String getName()
+    {
+        return "l";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/MoveTo.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/MoveTo.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/MoveTo.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/MoveTo.java Thu Sep 18 20:14:17 2014
@@ -39,4 +39,10 @@ public final class MoveTo extends Graphi
         Point2D pos = context.transformedPoint(x.doubleValue(), y.doubleValue());
         context.moveTo((float) pos.getX(), (float) pos.getY());
     }
+
+    @Override
+    public String getName()
+    {
+        return "m";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ShadingFill.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ShadingFill.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ShadingFill.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/ShadingFill.java Thu Sep 18 20:14:17 2014
@@ -35,4 +35,10 @@ public final class ShadingFill extends G
     {
         context.shadingFill((COSName) operands.get(0));
     }
+
+    @Override
+    public String getName()
+    {
+        return "sh";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/StrokePath.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/StrokePath.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/StrokePath.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/graphics/StrokePath.java Thu Sep 18 20:14:17 2014
@@ -35,4 +35,10 @@ public final class StrokePath extends Gr
     {
         context.strokePath();
     }
+
+    @Override
+    public String getName()
+    {
+        return "S";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/BeginMarkedContentSequence.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/BeginMarkedContentSequence.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/BeginMarkedContentSequence.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/BeginMarkedContentSequence.java Thu Sep 18 20:14:17 2014
@@ -48,4 +48,10 @@ public class BeginMarkedContentSequence 
             ((PDFMarkedContentExtractor) this.context).beginMarkedContentSequence(tag, null);
         }
     }
+
+    @Override
+    public String getName()
+    {
+        return "BMC";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/BeginMarkedContentSequenceWithProperties.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/BeginMarkedContentSequenceWithProperties.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/BeginMarkedContentSequenceWithProperties.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/BeginMarkedContentSequenceWithProperties.java Thu Sep 18 20:14:17 2014
@@ -54,4 +54,10 @@ public class BeginMarkedContentSequenceW
             ((PDFMarkedContentExtractor) this.context).beginMarkedContentSequence(tag, properties);
         }
     }
+
+    @Override
+    public String getName()
+    {
+        return "BDC";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/EndMarkedContentSequence.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/EndMarkedContentSequence.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/EndMarkedContentSequence.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/markedcontent/EndMarkedContentSequence.java Thu Sep 18 20:14:17 2014
@@ -39,4 +39,10 @@ public class EndMarkedContentSequence ex
             ((PDFMarkedContentExtractor) this.context).endMarkedContentSequence();
         }
     }
+
+    @Override
+    public String getName()
+    {
+        return "EMC";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Concatenate.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Concatenate.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Concatenate.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Concatenate.java Thu Sep 18 20:14:17 2014
@@ -55,4 +55,10 @@ public class Concatenate extends Operato
         context.getGraphicsState().setCurrentTransformationMatrix(
                 newMatrix.multiply(context.getGraphicsState().getCurrentTransformationMatrix()));
     }
+
+    @Override
+    public String getName()
+    {
+        return "cm";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Restore.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Restore.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Restore.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Restore.java Thu Sep 18 20:14:17 2014
@@ -46,4 +46,10 @@ public class Restore extends OperatorPro
             LOG.error("GRestore: no graphics state left to be restored.");
         }
     }
+
+    @Override
+    public String getName()
+    {
+        return "Q";
+    }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Save.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Save.java?rev=1626070&r1=1626069&r2=1626070&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Save.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/Save.java Thu Sep 18 20:14:17 2014
@@ -34,4 +34,10 @@ public class Save extends OperatorProces
     {
         context.saveGraphicsState();
     }
+
+    @Override
+    public String getName()
+    {
+        return "q";
+    }
 }

Added: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetFlatness.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetFlatness.java?rev=1626070&view=auto
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetFlatness.java (added)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetFlatness.java Thu Sep 18 20:14:17 2014
@@ -0,0 +1,46 @@
+/*
+ * 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.operator.state;
+
+import java.io.IOException;
+import java.util.List;
+import org.apache.pdfbox.cos.COSBase;
+import org.apache.pdfbox.cos.COSNumber;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
+
+/**
+ * i: Set the flatness tolerance.
+ *
+ * @author John Hewson
+ */
+public class SetFlatness extends OperatorProcessor
+{
+    @Override
+    public void process(Operator operator, List<COSBase> operands) throws IOException
+    {
+        COSNumber value = (COSNumber)operands.get(0);
+        context.getGraphicsState().setFlatness(value.floatValue());
+    }
+
+    @Override
+    public String getName()
+    {
+        return "i";
+    }
+}



Mime
View raw message