pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1610021 [3/3] - in /pdfbox/trunk: examples/src/main/java/org/apache/pdfbox/examples/util/ pdfbox/src/main/java/org/apache/pdfbox/pdfparser/ pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/ pdfbox/src/main/java/org/apache/pdfbox/pdmodel/ p...
Date Sat, 12 Jul 2014 18:35:49 GMT
Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineDashPattern.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineDashPattern.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineDashPattern.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineDashPattern.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineDashPattern.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineDashPattern.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineDashPattern.java Sat Jul 12 18:35:46 2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.state;
 
 import java.util.List;
 
@@ -22,20 +22,18 @@ import org.apache.pdfbox.cos.COSArray;
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSNumber;
 import org.apache.pdfbox.pdmodel.graphics.PDLineDashPattern;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 /**
- * Implementation of content stream operator for page drawer.
+ * d: Set the line dash pattern.
  *
  * @author Ben Litchfield
  */
 public class SetLineDashPattern extends OperatorProcessor
 {
-    /**
-     * Set the line dash pattern.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments)
+    @Override
+    public void process(Operator operator, List<COSBase> arguments)
     {
         COSArray dashArray = (COSArray)arguments.get( 0 );
         int dashPhase = ((COSNumber)arguments.get( 1 )).intValue();

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineJoinStyle.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineJoinStyle.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineJoinStyle.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineJoinStyle.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineJoinStyle.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineJoinStyle.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineJoinStyle.java Sat Jul 12 18:35:46 2014
@@ -14,32 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.state;
 
 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;
 
 import java.io.IOException;
 
 /**
- * Implementation of content stream operator for page drawer.
+ * j: Set the line join style.
  *
- * @author <a href="mailto:andreas@lehmi.de>Andreas Lehmkühler</a>
- * @version $Revision: 1.0 $
+ * @author Andreas Lehmkühler
  */
 public class SetLineJoinStyle extends OperatorProcessor
 {
-
-    /**
-     * Set the line cap style.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     *
-     * @throws IOException If an error occurs while processing the font.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         int lineJoinStyle = ((COSNumber)arguments.get( 0 )).intValue();
         context.getGraphicsState().setLineJoin( lineJoinStyle );

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineMiterLimit.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineMiterLimit.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineMiterLimit.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineMiterLimit.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineMiterLimit.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineMiterLimit.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineMiterLimit.java Sat Jul 12 18:35:46 2014
@@ -14,33 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.state;
 
 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;
 
 import java.io.IOException;
 
 /**
- * <p>Structal modification of the PDFEngine class :
- * the long sequence of conditions in processOperator is remplaced by
- * this strategy pattern.</p>
+ * w: Set miter limit.
  *
- * @author <a href="mailto:andreas@lehmi.de">Andreas Lehmkühler</a>
- * @version $Revision: 1.0 $
+ * @author Andreas Lehmkühler
  */
-
 public class SetLineMiterLimit extends OperatorProcessor
 {
-    /**
-     * w Set miter limit.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     * @throws IOException If an error occurs while processing the font.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         COSNumber miterLimit = (COSNumber)arguments.get( 0 );
         context.getGraphicsState().setMiterLimit( miterLimit.floatValue() );

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineWidth.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineWidth.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineWidth.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineWidth.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineWidth.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetLineWidth.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetLineWidth.java Sat Jul 12 18:35:46 2014
@@ -14,33 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.state;
 
 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;
 
 import java.io.IOException;
 
 /**
- * <p>Structal modification of the PDFEngine class :
- * the long sequence of conditions in processOperator is remplaced by
- * this strategy pattern.</p>
+ * w: Set line width.
  *
- * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
- * @version $Revision: 1.5 $
+ * @author Ben Litchfield
  */
-
 public class SetLineWidth extends OperatorProcessor
 {
-    /**
-     * w Set line width.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     * @throws IOException If an error occurs while processing the font.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         COSNumber width = (COSNumber)arguments.get( 0 );
         context.getGraphicsState().setLineWidth( width.floatValue() );

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetMatrix.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetMatrix.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetMatrix.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetMatrix.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetMatrix.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetMatrix.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/state/SetMatrix.java Sat Jul 12 18:35:46 2014
@@ -14,28 +14,25 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.state;
 
 import java.util.List;
 
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSNumber;
 import org.apache.pdfbox.util.Matrix;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 /**
- * @author Huault : huault@free.fr
- * @version $Revision: 1.4 $
+ * Tm: Set text matrix and text line matrix.
+ *
+ * @author Laurent Huault
  */
-
 public class SetMatrix extends OperatorProcessor
 {
-
-    /**
-     * Tm Set text matrix and text line matrix.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments)
+    @Override
+    public void process(Operator operator, List<COSBase> arguments)
     {
         //Set text matrix and text line matrix
         COSNumber a = (COSNumber)arguments.get( 0 );

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/BeginText.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/BeginText.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/BeginText.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/BeginText.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/BeginText.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/BeginText.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/BeginText.java Sat Jul 12 18:35:46 2014
@@ -14,29 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 import java.io.IOException;
 import java.util.List;
 
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.util.Matrix;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 /**
+ * BT: Begin text.
  *
- * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
- * @author Huault : huault@free.fr
- * @version $Revision: 1.5 $
+ * @author Ben Litchfield
+ * @author Laurent Huault
  */
 public class BeginText extends OperatorProcessor
 {
-
-    /**
-     * process : BT : Begin text object.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         context.setTextMatrix( new Matrix());
         context.setTextLineMatrix( new Matrix() );

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/EndText.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/EndText.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/EndText.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/EndText.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/EndText.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/EndText.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/EndText.java Sat Jul 12 18:35:46 2014
@@ -14,29 +14,27 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
+import java.io.IOException;
 import java.util.List;
 
 import org.apache.pdfbox.cos.COSBase;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 /**
+ * ET: End text.
  *
- * @author Huault : huault@free.fr
- * @version $Revision: 1.4 $
+ * @author Laurent Huault
  */
 public class EndText extends OperatorProcessor
 {
-
-    /**
-     * process : ET : End text object.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments)
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
-        context.setTextMatrix( null);
-        context.setTextLineMatrix( null);
+        context.setTextMatrix(null);
+        context.setTextLineMatrix(null);
+        context.endText();
     }
-
 }

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveAndShow.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/MoveAndShow.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveAndShow.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveAndShow.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/MoveAndShow.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/MoveAndShow.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveAndShow.java Sat Jul 12 18:35:46 2014
@@ -14,33 +14,27 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 import java.util.List;
 
 import org.apache.pdfbox.cos.COSBase;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 import java.io.IOException;
 
 /**
- * @author Huault : huault@free.fr
- * @version $Revision: 1.5 $
+ * ': Move to the next line and show text.
+ *
+ * @author Laurent Huault
  */
 public class MoveAndShow extends OperatorProcessor
 {
-    /**
-     * ' Move to next line and show text.
-     * @param arguments List
-     * @param operator The operator that is being executed.
-     * @throws IOException If there is an error processing the operator.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
-        // Move to start of next text line, and show text
-        //
-
         context.processOperator("T*", null);
         context.processOperator("Tj", arguments);
     }
-
 }

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveText.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/MoveText.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveText.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveText.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/MoveText.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/MoveText.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveText.java Sat Jul 12 18:35:46 2014
@@ -14,28 +14,25 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 import java.util.List;
 
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSNumber;
 import org.apache.pdfbox.util.Matrix;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 /**
+ * Td: Move text position.
  *
- * @author Huault : huault@free.fr
- * @version $Revision: 1.4 $
+ * @author Laurent Huault
  */
 public class MoveText extends OperatorProcessor
 {
-
-    /**
-     * process : Td : Move text position.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments)
+    @Override
+    public void process(Operator operator, List<COSBase> arguments)
     {
         COSNumber x = (COSNumber)arguments.get( 0 );
         COSNumber y = (COSNumber)arguments.get( 1 );

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveTextSetLeading.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/MoveTextSetLeading.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveTextSetLeading.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveTextSetLeading.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/MoveTextSetLeading.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/MoveTextSetLeading.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/MoveTextSetLeading.java Sat Jul 12 18:35:46 2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -23,31 +23,25 @@ import java.util.List;
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSFloat;
 import org.apache.pdfbox.cos.COSNumber;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 /**
+ * TD: Move text position and set leading.
  *
- * @author Huault : huault@free.fr
- * @version $Revision: 1.5 $
+ * @author Laurent Huault
  */
 public class MoveTextSetLeading extends OperatorProcessor
 {
-
-    /**
-     * process : TD Move text position and set leading.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     *
-     * @throws IOException If there is an error during processing.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         //move text position and set leading
-        COSNumber y = (COSNumber)arguments.get( 1 );
+        COSNumber y = (COSNumber)arguments.get(1);
 
         ArrayList<COSBase> args = new ArrayList<COSBase>();
-        args.add(new COSFloat(-1*y.floatValue()));
+        args.add(new COSFloat(-1 * y.floatValue()));
         context.processOperator("TL", args);
         context.processOperator("Td", arguments);
-
     }
 }

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/NextLine.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/NextLine.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/NextLine.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/NextLine.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/NextLine.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/NextLine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/NextLine.java Sat Jul 12 18:35:46 2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -22,31 +22,26 @@ import java.util.List;
 
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSFloat;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 /**
+ * T*: Move to start of next text line.
  *
- * @author Huault : huault@free.fr
- * @version $Revision: 1.5 $
+ * @author Laurent Huault
  */
 public class NextLine extends OperatorProcessor
 {
-    /**
-     * process : T* Move to start of next text line.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     *
-     * @throws IOException If there is an error during processing.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         //move to start of next text line
         ArrayList<COSBase> args = new ArrayList<COSBase>();
-        args.add(new COSFloat(0.0f));
+        args.add(new COSFloat(0f));
         // this must be -leading instead of just leading as written in the
         // specification (p.369) the acrobat reader seems to implement it the same way
-        args.add(new COSFloat(-1*context.getGraphicsState().getTextState().getLeading()));
+        args.add(new COSFloat(-1 * context.getGraphicsState().getTextState().getLeading()));
         // use Td instead of repeating code
         context.processOperator("Td", args);
-
     }
 }

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetCharSpacing.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetCharSpacing.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetCharSpacing.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetCharSpacing.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetCharSpacing.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetCharSpacing.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetCharSpacing.java Sat Jul 12 18:35:46 2014
@@ -14,38 +14,36 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 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;
 
 /**
+ * Tc: Set character spacing.
  *
- * @author Huault : huault@free.fr
- * @version $Revision: 1.5 $
+ * @author Laurent Huault
  */
 public class SetCharSpacing extends OperatorProcessor
 {
-    /**
-     * process : Tc Set character spacing.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments)
+    @Override
+    public void process(Operator operator, List<COSBase> arguments)
     {
         //set character spacing
-        if( arguments.size() > 0 )
+        if(arguments.size() > 0)
         {
             //There are some documents which are incorrectly structured, and have
             //a wrong number of arguments to this, so we will assume the last argument
             //in the list
-            Object charSpacing = arguments.get( arguments.size()-1 );
-            if( charSpacing instanceof COSNumber )
+            Object charSpacing = arguments.get(arguments.size()-1);
+            if(charSpacing instanceof COSNumber)
             {
                 COSNumber characterSpacing = (COSNumber)charSpacing;
-                context.getGraphicsState().getTextState().setCharacterSpacing( characterSpacing.floatValue() );
+                context.getGraphicsState().getTextState().setCharacterSpacing(characterSpacing.floatValue());
             }
         }
     }

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetHorizontalTextScaling.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetHorizontalTextScaling.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetHorizontalTextScaling.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetHorizontalTextScaling.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetHorizontalTextScaling.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetHorizontalTextScaling.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetHorizontalTextScaling.java Sat Jul 12 18:35:46 2014
@@ -14,33 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 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;
 
 import java.io.IOException;
 
 /**
- * <p>Structal modification of the PDFEngine class :
- * the long sequence of conditions in processOperator is remplaced by
- * this strategy pattern.</p>
+ * Tz: Set horizontal text scaling.
  *
- * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
- * @version $Revision: 1.5 $
+ * @author Ben Litchfield
  */
-
 public class SetHorizontalTextScaling extends OperatorProcessor
 {
-    /**
-     * Tz Set horizontal text scaling.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     * @throws IOException If an error occurs while processing the font.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         COSNumber scaling = (COSNumber)arguments.get(0);
         context.getGraphicsState().getTextState().setHorizontalScaling(scaling.floatValue());

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetMoveAndShow.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetMoveAndShow.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetMoveAndShow.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetMoveAndShow.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetMoveAndShow.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetMoveAndShow.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetMoveAndShow.java Sat Jul 12 18:35:46 2014
@@ -14,31 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 import java.util.List;
 
 import org.apache.pdfbox.cos.COSBase;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 import java.io.IOException;
 
 /**
- * @author Huault : huault@free.fr
- * @version $Revision: 1.6 $
+ * ": Set word and character spacing, move to next line, and show text.
+ *
+ * @author Laurent Huault
  */
-
 public class SetMoveAndShow extends OperatorProcessor
 {
-    /**
-     * " Set word and character spacing, move to next line, and show text.
-     * @param operator The operator that is being executed.
-     * @param arguments List.
-     * @throws IOException If there is an error processing the operator.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
-        //Set word and character spacing, move to next line, and show text
-        //
         context.processOperator("Tw", arguments.subList(0,1));
         context.processOperator("Tc", arguments.subList(1,2));
         context.processOperator("'", arguments.subList(2,3));

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextFont.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextFont.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextFont.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextFont.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextFont.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextFont.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextFont.java Sat Jul 12 18:35:46 2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 import java.util.List;
 
@@ -22,35 +22,31 @@ import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSNumber;
 import org.apache.pdfbox.pdmodel.font.PDFont;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 import java.io.IOException;
 
 /**
- * @author Huault : huault@free.fr
- * @version $Revision: 1.5 $
+ * Tf: Set text font and size.
+ *
+ * @author Laurent Huault
  */
-
 public class SetTextFont extends OperatorProcessor
 {
-    /**
-     * Tf selectfont Set text font and size.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     * @throws IOException If an error occurs while processing the font.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
-        //there are some documents that are incorrectly structured and
-        //arguments are in the wrong spot, so we will silently ignore them
-        //if there are no arguments
+        // there are some documents that are incorrectly structured and
+        // arguments are in the wrong spot, so we will silently ignore them
+        // if there are no arguments
         if( arguments.size() >= 2 )
         {
-            //set font and size
+            // set font and size
             COSName fontName = (COSName)arguments.get( 0 );
             float fontSize = ((COSNumber)arguments.get( 1 ) ).floatValue();
             context.getGraphicsState().getTextState().setFontSize( fontSize );
             context.getGraphicsState().getTextState().setFont( context.getFonts().get( fontName.getName() ) );
         }
     }
-
 }

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextLeading.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextLeading.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextLeading.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextLeading.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextLeading.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextLeading.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextLeading.java Sat Jul 12 18:35:46 2014
@@ -14,29 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 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;
 
 /**
- * @author Huault : huault@free.fr
- * @version $Revision: 1.4 $
+ * TL: Set text leading.
+ *
+ * @author Laurent Huault
  */
-
 public class SetTextLeading extends OperatorProcessor
 {
-    /**
-     * TL Set text leading.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments)
+    @Override
+    public void process(Operator operator, List<COSBase> arguments)
     {
         COSNumber leading = (COSNumber)arguments.get( 0 );
         context.getGraphicsState().getTextState().setLeading( leading.floatValue() );
     }
-
 }

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextRenderingMode.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextRenderingMode.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextRenderingMode.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextRenderingMode.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextRenderingMode.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextRenderingMode.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextRenderingMode.java Sat Jul 12 18:35:46 2014
@@ -14,33 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 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;
 
 import java.io.IOException;
 
 /**
- * <p>Structal modification of the PDFEngine class :
- * the long sequence of conditions in processOperator is remplaced by
- * this strategy pattern.</p>
+ * Tr: Set text rendering mode.
  *
- * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
- * @version $Revision: 1.5 $
+ * @author Ben Litchfield
  */
-
 public class SetTextRenderingMode extends OperatorProcessor
 {
-    /**
-     * Tr Set text rendering mode.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     * @throws IOException If an error occurs while processing the font.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         COSNumber mode = (COSNumber)arguments.get( 0 );
         context.getGraphicsState().getTextState().setRenderingMode( mode.intValue() );

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextRise.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextRise.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextRise.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextRise.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextRise.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetTextRise.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetTextRise.java Sat Jul 12 18:35:46 2014
@@ -14,33 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 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;
 
 import java.io.IOException;
 
 /**
- * <p>Structal modification of the PDFEngine class :
- * the long sequence of conditions in processOperator is remplaced by
- * this strategy pattern.</p>
+ * Ts: Set text rise.
  *
- * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
- * @version $Revision: 1.5 $
+ * @author Ben Litchfield
  */
-
 public class SetTextRise extends OperatorProcessor
 {
-    /**
-     * Ts Set text rise.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     * @throws IOException If an error occurs while processing the font.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         COSNumber rise = (COSNumber)arguments.get(0);
         context.getGraphicsState().getTextState().setRise( rise.floatValue() );

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetWordSpacing.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetWordSpacing.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetWordSpacing.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetWordSpacing.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetWordSpacing.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/SetWordSpacing.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/SetWordSpacing.java Sat Jul 12 18:35:46 2014
@@ -14,30 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 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;
 
 /**
- * @author Huault : huault@free.fr
- * @version $Revision: 1.4 $
+ * Tw: Set word spacing.
+ *
+ * @author Laurent Huault
  */
-
 public class SetWordSpacing extends OperatorProcessor
 {
-    /**
-     * Tw Set word spacing.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments)
+    @Override
+    public void process(Operator operator, List<COSBase> arguments)
     {
-        //set word spacing
         COSNumber wordSpacing = (COSNumber)arguments.get( 0 );
         context.getGraphicsState().getTextState().setWordSpacing( wordSpacing.floatValue() );
     }
-
 }

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowText.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/ShowText.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowText.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowText.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/ShowText.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/ShowText.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowText.java Sat Jul 12 18:35:46 2014
@@ -14,34 +14,28 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
 import java.util.List;
 
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSString;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 import java.io.IOException;
 
 /**
- * @author Huault : huault@free.fr
- * @version $Revision: 1.4 $
+ * Tj: Show text.
+ *
+ * @author Laurent Huault
  */
-
 public class ShowText extends OperatorProcessor
 {
-
-    /**
-     * Tj show Show text.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     *
-     * @throws IOException If there is an error processing this operator.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         COSString string = (COSString)arguments.get( 0 );
-        context.processText(string.getBytes());
+        context.showText(string.getBytes());
     }
-
 }

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowTextGlyph.java (from r1609836, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/ShowTextGlyph.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowTextGlyph.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowTextGlyph.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/ShowTextGlyph.java&r1=1609836&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/ShowTextGlyph.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/operator/text/ShowTextGlyph.java Sat Jul 12 18:35:46 2014
@@ -14,57 +14,58 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.util.operator;
+package org.apache.pdfbox.util.operator.text;
 
+import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.pdfbox.util.Matrix;
 import org.apache.pdfbox.cos.COSArray;
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSNumber;
 import java.io.IOException;
 import org.apache.pdfbox.cos.COSString;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 /**
- * @author Huault : huault@free.fr
- * @version $Revision: 1.6 $
+ * TJ: Show text, with position adjustments.
+ *
+ * @author Laurent Huault
  */
-
 public class ShowTextGlyph extends OperatorProcessor
 {
-    /**
-     * TJ Show text, allowing individual glyph positioning.
-     * @param operator The operator that is being executed.
-     * @param arguments List
-     * @throws IOException If there is an error processing this operator.
-     */
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    @Override
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
-        COSArray array = (COSArray)arguments.get( 0 );
-        int arraySize = array.size();
-        float fontsize = context.getGraphicsState().getTextState().getFontSize();
-        float horizontalScaling = context.getGraphicsState().getTextState().getHorizontalScaling()/100;
-        for( int i=0; i<arraySize; i++ )
+        COSArray array = (COSArray)arguments.get(0);
+
+        List<Float> adjustments = new ArrayList<Float>();
+        List<byte[]> strings = new ArrayList<byte[]>();
+        boolean lastWasAdjustment = false;
+
+        for(int i = 0, len = array.size(); i < len; i++)
         {
-            COSBase next = array.get( i );
-            if( next instanceof COSNumber )
+            COSBase next = array.get(i);
+            if(next instanceof COSNumber)
             {
-                float adjustment = ((COSNumber)next).floatValue();
-                Matrix adjMatrix = new Matrix();
-                adjustment=-(adjustment/1000)*horizontalScaling*fontsize;
-                // TODO vertical writing mode
-                adjMatrix.setValue( 2, 0, adjustment );
-                context.setTextMatrix( adjMatrix.multiply(context.getTextMatrix(), adjMatrix) );
+                adjustments.add(((COSNumber)next).floatValue());
+                lastWasAdjustment = true;
             }
-            else if( next instanceof COSString )
+            else if(next instanceof COSString)
             {
-                context.processText(((COSString) next).getBytes());
+                if (!lastWasAdjustment)
+                {
+                    adjustments.add(0f);
+                }
+                strings.add(((COSString)next).getBytes());
+                lastWasAdjustment = false;
             }
             else
             {
-                throw new IOException( "Unknown type in array for TJ operation:" + next );
+                throw new IOException("Unknown type in array for TJ operation:" + next);
             }
         }
-    }
 
+        context.showAdjustedText(strings, adjustments);
+    }
 }

Copied: pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFGraphicsStreamEngine.properties (from r1609347, pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PageDrawer.properties)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFGraphicsStreamEngine.properties?p2=pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFGraphicsStreamEngine.properties&p1=pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PageDrawer.properties&r1=1609347&r2=1610021&rev=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PageDrawer.properties (original)
+++ pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFGraphicsStreamEngine.properties Sat Jul 12 18:35:46 2014
@@ -17,76 +17,76 @@
 # OperatorProcessor abstract class for the stategy pattern used in the 
 # org.apache.pdfbox.util.PDFStreamEngine class.
 # To change the behaviour of the system, remplace the class name by a new class name.
-b=org.apache.pdfbox.util.operator.pagedrawer.CloseFillNonZeroAndStrokePath
-B=org.apache.pdfbox.util.operator.pagedrawer.FillNonZeroAndStrokePath
-b*=org.apache.pdfbox.util.operator.pagedrawer.CloseFillEvenOddAndStrokePath
-B*=org.apache.pdfbox.util.operator.pagedrawer.FillEvenOddAndStrokePath
+b=org.apache.pdfbox.util.operator.graphics.CloseFillNonZeroAndStrokePath
+B=org.apache.pdfbox.util.operator.graphics.FillNonZeroAndStrokePath
+b*=org.apache.pdfbox.util.operator.graphics.CloseFillEvenOddAndStrokePath
+B*=org.apache.pdfbox.util.operator.graphics.FillEvenOddAndStrokePath
 #BDC org.apache.pdfbox.util.operator.NotImplemented ##Begin Marked Content -- section 10.5
-BI=org.apache.pdfbox.util.operator.pagedrawer.BeginInlineImage
+BI=org.apache.pdfbox.util.operator.graphics.BeginInlineImage
 #BMC org.apache.pdfbox.util.operator.NotImplemented ##Begin Marked Content -- section 10.5
-BT=org.apache.pdfbox.util.operator.BeginText
+BT=org.apache.pdfbox.util.operator.text.BeginText
 #BX org.apache.pdfbox.util.operator.NotImplemented
-c=org.apache.pdfbox.util.operator.pagedrawer.CurveTo
-cm=org.apache.pdfbox.util.operator.Concatenate
-CS=org.apache.pdfbox.util.operator.SetStrokingColorSpace
-cs=org.apache.pdfbox.util.operator.SetNonStrokingColorSpace
-d=org.apache.pdfbox.util.operator.SetLineDashPattern
+c=org.apache.pdfbox.util.operator.graphics.CurveTo
+cm=org.apache.pdfbox.util.operator.state.Concatenate
+CS=org.apache.pdfbox.util.operator.color.SetStrokingColorSpace
+cs=org.apache.pdfbox.util.operator.color.SetNonStrokingColorSpace
+d=org.apache.pdfbox.util.operator.state.SetLineDashPattern
 #d0 org.apache.pdfbox.util.operator.NotImplemented
 #d1 org.apache.pdfbox.util.operator.NotImplemented
-Do=org.apache.pdfbox.util.operator.pagedrawer.Invoke
+Do=org.apache.pdfbox.util.operator.graphics.DrawObject
 #DP org.apache.pdfbox.util.operator.NotImplemented ##Marked Content Point-- section 10.5
 #El org.apache.pdfbox.util.operator.NotImplemented
 #EMC org.apache.pdfbox.util.operator.NotImplemented ##End Marked Content -- section 10.5
-ET=org.apache.pdfbox.util.operator.EndText
+ET=org.apache.pdfbox.util.operator.text.EndText
 #EX org.apache.pdfbox.util.operator.NotImplemented
-f=org.apache.pdfbox.util.operator.pagedrawer.FillNonZeroRule
-F=org.apache.pdfbox.util.operator.pagedrawer.FillNonZeroRule
-f*=org.apache.pdfbox.util.operator.pagedrawer.FillEvenOddRule
-G=org.apache.pdfbox.util.operator.SetStrokingDeviceGrayColor
-g=org.apache.pdfbox.util.operator.SetNonStrokingDeviceGrayColor
-gs=org.apache.pdfbox.util.operator.SetGraphicsStateParameters
-h=org.apache.pdfbox.util.operator.pagedrawer.ClosePath
+f=org.apache.pdfbox.util.operator.graphics.FillNonZeroRule
+F=org.apache.pdfbox.util.operator.graphics.FillNonZeroRule
+f*=org.apache.pdfbox.util.operator.graphics.FillEvenOddRule
+G=org.apache.pdfbox.util.operator.color.SetStrokingDeviceGrayColor
+g=org.apache.pdfbox.util.operator.color.SetNonStrokingDeviceGrayColor
+gs=org.apache.pdfbox.util.operator.state.SetGraphicsStateParameters
+h=org.apache.pdfbox.util.operator.graphics.ClosePath
 #i org.apache.pdfbox.util.operator.NotImplemented
 #ID org.apache.pdfbox.util.operator.NotImplemented
-j=org.apache.pdfbox.util.operator.SetLineJoinStyle
-J=org.apache.pdfbox.util.operator.SetLineCapStyle
-K=org.apache.pdfbox.util.operator.SetStrokingDeviceCMYKColor
-k=org.apache.pdfbox.util.operator.SetNonStrokingDeviceCMYKColor
-l=org.apache.pdfbox.util.operator.pagedrawer.LineTo
-m=org.apache.pdfbox.util.operator.pagedrawer.MoveTo
-M=org.apache.pdfbox.util.operator.SetLineMiterLimit
+j=org.apache.pdfbox.util.operator.state.SetLineJoinStyle
+J=org.apache.pdfbox.util.operator.state.SetLineCapStyle
+K=org.apache.pdfbox.util.operator.color.SetStrokingDeviceCMYKColor
+k=org.apache.pdfbox.util.operator.color.SetNonStrokingDeviceCMYKColor
+l=org.apache.pdfbox.util.operator.graphics.LineTo
+m=org.apache.pdfbox.util.operator.graphics.MoveTo
+M=org.apache.pdfbox.util.operator.state.SetLineMiterLimit
 #MP org.apache.pdfbox.util.operator.NotImplemented ##Marked Content Point-- section 10.5
-n=org.apache.pdfbox.util.operator.pagedrawer.EndPath
-q=org.apache.pdfbox.util.operator.GSave
-Q=org.apache.pdfbox.util.operator.GRestore
-re=org.apache.pdfbox.util.operator.pagedrawer.AppendRectangleToPath
-RG=org.apache.pdfbox.util.operator.SetStrokingDeviceRGBColor
-rg=org.apache.pdfbox.util.operator.SetNonStrokingDeviceRGBColor
+n=org.apache.pdfbox.util.operator.graphics.EndPath
+q=org.apache.pdfbox.util.operator.state.Save
+Q=org.apache.pdfbox.util.operator.state.Restore
+re=org.apache.pdfbox.util.operator.graphics.AppendRectangleToPath
+RG=org.apache.pdfbox.util.operator.color.SetStrokingDeviceRGBColor
+rg=org.apache.pdfbox.util.operator.color.SetNonStrokingDeviceRGBColor
 #ri org.apache.pdfbox.util.operator.NotImplemented
-s=org.apache.pdfbox.util.operator.CloseAndStrokePath
-S=org.apache.pdfbox.util.operator.pagedrawer.StrokePath
-SC=org.apache.pdfbox.util.operator.SetStrokingColor
-sc=org.apache.pdfbox.util.operator.SetNonStrokingColor
-SCN=org.apache.pdfbox.util.operator.SetStrokingColor
-scn=org.apache.pdfbox.util.operator.SetNonStrokingColor
-sh=org.apache.pdfbox.util.operator.pagedrawer.SHFill
-T*=org.apache.pdfbox.util.operator.NextLine
-Tc=org.apache.pdfbox.util.operator.SetCharSpacing
-Td=org.apache.pdfbox.util.operator.MoveText
-TD=org.apache.pdfbox.util.operator.MoveTextSetLeading
-Tf=org.apache.pdfbox.util.operator.SetTextFont
-Tj=org.apache.pdfbox.util.operator.ShowText
-TJ=org.apache.pdfbox.util.operator.ShowTextGlyph
-TL=org.apache.pdfbox.util.operator.SetTextLeading
-Tm=org.apache.pdfbox.util.operator.SetMatrix
-Tr=org.apache.pdfbox.util.operator.SetTextRenderingMode
-Ts=org.apache.pdfbox.util.operator.SetTextRise
-Tw=org.apache.pdfbox.util.operator.SetWordSpacing
-Tz=org.apache.pdfbox.util.operator.SetHorizontalTextScaling
-v=org.apache.pdfbox.util.operator.pagedrawer.CurveToReplicateInitialPoint
-w=org.apache.pdfbox.util.operator.SetLineWidth
-W org.apache.pdfbox.util.operator.pagedrawer.ClipNonZeroRule
-W* org.apache.pdfbox.util.operator.pagedrawer.ClipEvenOddRule
-y=org.apache.pdfbox.util.operator.pagedrawer.CurveToReplicateFinalPoint
-\'=org.apache.pdfbox.util.operator.MoveAndShow
-\"=org.apache.pdfbox.util.operator.SetMoveAndShow
+s=org.apache.pdfbox.util.operator.graphics.CloseAndStrokePath
+S=org.apache.pdfbox.util.operator.graphics.StrokePath
+SC=org.apache.pdfbox.util.operator.color.SetStrokingColor
+sc=org.apache.pdfbox.util.operator.color.SetNonStrokingColor
+SCN=org.apache.pdfbox.util.operator.color.SetStrokingColor
+scn=org.apache.pdfbox.util.operator.color.SetNonStrokingColor
+sh=org.apache.pdfbox.util.operator.graphics.ShadingFill
+T*=org.apache.pdfbox.util.operator.text.NextLine
+Tc=org.apache.pdfbox.util.operator.text.SetCharSpacing
+Td=org.apache.pdfbox.util.operator.text.MoveText
+TD=org.apache.pdfbox.util.operator.text.MoveTextSetLeading
+Tf=org.apache.pdfbox.util.operator.text.SetTextFont
+Tj=org.apache.pdfbox.util.operator.text.ShowText
+TJ=org.apache.pdfbox.util.operator.text.ShowTextGlyph
+TL=org.apache.pdfbox.util.operator.text.SetTextLeading
+Tm=org.apache.pdfbox.util.operator.state.SetMatrix
+Tr=org.apache.pdfbox.util.operator.text.SetTextRenderingMode
+Ts=org.apache.pdfbox.util.operator.text.SetTextRise
+Tw=org.apache.pdfbox.util.operator.text.SetWordSpacing
+Tz=org.apache.pdfbox.util.operator.text.SetHorizontalTextScaling
+v=org.apache.pdfbox.util.operator.graphics.CurveToReplicateInitialPoint
+w=org.apache.pdfbox.util.operator.state.SetLineWidth
+W org.apache.pdfbox.util.operator.graphics.ClipNonZeroRule
+W* org.apache.pdfbox.util.operator.graphics.ClipEvenOddRule
+y=org.apache.pdfbox.util.operator.graphics.CurveToReplicateFinalPoint
+\'=org.apache.pdfbox.util.operator.text.MoveAndShow
+\"=org.apache.pdfbox.util.operator.text.SetMoveAndShow

Modified: pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFMarkedContentExtractor.properties
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFMarkedContentExtractor.properties?rev=1610021&r1=1610020&r2=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFMarkedContentExtractor.properties (original)
+++ pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFMarkedContentExtractor.properties Sat Jul 12 18:35:46 2014
@@ -18,33 +18,33 @@
 # PDF document. The classes configured here allow the PDFTextStripper
 # subclass of PDFStreamEngine to extract text content of the document.
 
-BT = org.apache.pdfbox.util.operator.BeginText
-cm = org.apache.pdfbox.util.operator.Concatenate
-Do = org.apache.pdfbox.util.operator.Invoke
-ET = org.apache.pdfbox.util.operator.EndText
-gs = org.apache.pdfbox.util.operator.SetGraphicsStateParameters
-q  = org.apache.pdfbox.util.operator.GSave
-Q  = org.apache.pdfbox.util.operator.GRestore
-T* = org.apache.pdfbox.util.operator.NextLine
-Tc = org.apache.pdfbox.util.operator.SetCharSpacing
-Td = org.apache.pdfbox.util.operator.MoveText
-TD = org.apache.pdfbox.util.operator.MoveTextSetLeading
-Tf = org.apache.pdfbox.util.operator.SetTextFont
-Tj = org.apache.pdfbox.util.operator.ShowText
-TJ = org.apache.pdfbox.util.operator.ShowTextGlyph
-TL = org.apache.pdfbox.util.operator.SetTextLeading
-Tm = org.apache.pdfbox.util.operator.SetMatrix
-Tr = org.apache.pdfbox.util.operator.SetTextRenderingMode
-Ts = org.apache.pdfbox.util.operator.SetTextRise
-Tw = org.apache.pdfbox.util.operator.SetWordSpacing
-Tz = org.apache.pdfbox.util.operator.SetHorizontalTextScaling
-w  = org.apache.pdfbox.util.operator.SetLineWidth
-\' = org.apache.pdfbox.util.operator.MoveAndShow
-\" = org.apache.pdfbox.util.operator.SetMoveAndShow
+BT = org.apache.pdfbox.util.operator.text.BeginText
+cm = org.apache.pdfbox.util.operator.state.Concatenate
+Do = org.apache.pdfbox.util.operator.DrawObject
+ET = org.apache.pdfbox.util.operator.text.EndText
+gs = org.apache.pdfbox.util.operator.state.SetGraphicsStateParameters
+q  = org.apache.pdfbox.util.operator.state.Save
+Q  = org.apache.pdfbox.util.operator.state.Restore
+T* = org.apache.pdfbox.util.operator.text.NextLine
+Tc = org.apache.pdfbox.util.operator.text.SetCharSpacing
+Td = org.apache.pdfbox.util.operator.text.MoveText
+TD = org.apache.pdfbox.util.operator.text.MoveTextSetLeading
+Tf = org.apache.pdfbox.util.operator.text.SetTextFont
+Tj = org.apache.pdfbox.util.operator.text.ShowText
+TJ = org.apache.pdfbox.util.operator.text.ShowTextGlyph
+TL = org.apache.pdfbox.util.operator.text.SetTextLeading
+Tm = org.apache.pdfbox.util.operator.state.SetMatrix
+Tr = org.apache.pdfbox.util.operator.text.SetTextRenderingMode
+Ts = org.apache.pdfbox.util.operator.text.SetTextRise
+Tw = org.apache.pdfbox.util.operator.text.SetWordSpacing
+Tz = org.apache.pdfbox.util.operator.text.SetHorizontalTextScaling
+w  = org.apache.pdfbox.util.operator.state.SetLineWidth
+\' = org.apache.pdfbox.util.operator.text.MoveAndShow
+\" = org.apache.pdfbox.util.operator.text.SetMoveAndShow
 
-BDC = org.apache.pdfbox.util.operator.BeginMarkedContentSequenceWithProperties
-BMC = org.apache.pdfbox.util.operator.BeginMarkedContentSequence
-EMC = org.apache.pdfbox.util.operator.EndMarkedContentSequence
+BDC = org.apache.pdfbox.util.operator.markedcontent.BeginMarkedContentSequenceWithProperties
+BMC = org.apache.pdfbox.util.operator.markedcontent.BeginMarkedContentSequence
+EMC = org.apache.pdfbox.util.operator.markedcontent.EndMarkedContentSequence
 
 # The following operators are not relevant to text extraction,
 # so we can silently ignore them.

Modified: pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFTextStripper.properties
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFTextStripper.properties?rev=1610021&r1=1610020&r2=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFTextStripper.properties (original)
+++ pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFTextStripper.properties Sat Jul 12 18:35:46 2014
@@ -18,29 +18,29 @@
 # PDF document. The classes configured here allow the PDFTextStripper
 # subclass of PDFStreamEngine to extract text content of the document.
 
-BT = org.apache.pdfbox.util.operator.BeginText
-cm = org.apache.pdfbox.util.operator.Concatenate
-Do = org.apache.pdfbox.util.operator.Invoke
-ET = org.apache.pdfbox.util.operator.EndText
-gs = org.apache.pdfbox.util.operator.SetGraphicsStateParameters
-q  = org.apache.pdfbox.util.operator.GSave
-Q  = org.apache.pdfbox.util.operator.GRestore
-T* = org.apache.pdfbox.util.operator.NextLine
-Tc = org.apache.pdfbox.util.operator.SetCharSpacing
-Td = org.apache.pdfbox.util.operator.MoveText
-TD = org.apache.pdfbox.util.operator.MoveTextSetLeading
-Tf = org.apache.pdfbox.util.operator.SetTextFont
-Tj = org.apache.pdfbox.util.operator.ShowText
-TJ = org.apache.pdfbox.util.operator.ShowTextGlyph
-TL = org.apache.pdfbox.util.operator.SetTextLeading
-Tm = org.apache.pdfbox.util.operator.SetMatrix
-Tr = org.apache.pdfbox.util.operator.SetTextRenderingMode
-Ts = org.apache.pdfbox.util.operator.SetTextRise
-Tw = org.apache.pdfbox.util.operator.SetWordSpacing
-Tz = org.apache.pdfbox.util.operator.SetHorizontalTextScaling
-w  = org.apache.pdfbox.util.operator.SetLineWidth
-\' = org.apache.pdfbox.util.operator.MoveAndShow
-\" = org.apache.pdfbox.util.operator.SetMoveAndShow
+BT = org.apache.pdfbox.util.operator.text.BeginText
+cm = org.apache.pdfbox.util.operator.state.Concatenate
+Do = org.apache.pdfbox.util.operator.DrawObject
+ET = org.apache.pdfbox.util.operator.text.EndText
+gs = org.apache.pdfbox.util.operator.state.SetGraphicsStateParameters
+q  = org.apache.pdfbox.util.operator.state.Save
+Q  = org.apache.pdfbox.util.operator.state.Restore
+T* = org.apache.pdfbox.util.operator.text.NextLine
+Tc = org.apache.pdfbox.util.operator.text.SetCharSpacing
+Td = org.apache.pdfbox.util.operator.text.MoveText
+TD = org.apache.pdfbox.util.operator.text.MoveTextSetLeading
+Tf = org.apache.pdfbox.util.operator.text.SetTextFont
+Tj = org.apache.pdfbox.util.operator.text.ShowText
+TJ = org.apache.pdfbox.util.operator.text.ShowTextGlyph
+TL = org.apache.pdfbox.util.operator.text.SetTextLeading
+Tm = org.apache.pdfbox.util.operator.state.SetMatrix
+Tr = org.apache.pdfbox.util.operator.text.SetTextRenderingMode
+Ts = org.apache.pdfbox.util.operator.text.SetTextRise
+Tw = org.apache.pdfbox.util.operator.text.SetWordSpacing
+Tz = org.apache.pdfbox.util.operator.text.SetHorizontalTextScaling
+w  = org.apache.pdfbox.util.operator.state.SetLineWidth
+\' = org.apache.pdfbox.util.operator.text.MoveAndShow
+\" = org.apache.pdfbox.util.operator.text.SetMoveAndShow
 
 # The following operators are not relevant to text extraction,
 # so we can silently ignore them.

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/TestAll.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/TestAll.java?rev=1610021&r1=1610020&r2=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/TestAll.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/TestAll.java Sat Jul 12 18:35:46 2014
@@ -35,7 +35,7 @@ import org.apache.pdfbox.pdmodel.TestPDD
 import org.apache.pdfbox.pdmodel.common.TestPDNameTreeNode;
 import org.apache.pdfbox.pdmodel.common.TestPDNumberTreeNode;
 import org.apache.pdfbox.pdmodel.edit.TestPDPageContentStream;
-import org.apache.pdfbox.pdmodel.graphics.optional_content.TestOptionalContentGroups;
+import org.apache.pdfbox.pdmodel.graphics.optionalcontent.TestOptionalContentGroups;
 import org.apache.pdfbox.pdmodel.interactive.form.TestFields;
 import org.apache.pdfbox.util.TestDateUtil;
 import org.apache.pdfbox.util.TestImageIOUtils;

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/edit/TestPDPageContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/edit/TestPDPageContentStream.java?rev=1610021&r1=1610020&r2=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/edit/TestPDPageContentStream.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/edit/TestPDPageContentStream.java Sat Jul 12 18:35:46 2014
@@ -22,7 +22,8 @@ import org.apache.pdfbox.cos.COSStream;
 import org.apache.pdfbox.pdfparser.PDFStreamParser;
 import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdmodel.PDPage;
-import org.apache.pdfbox.util.operator.PDFOperator;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.Operator;
 
 import java.io.IOException;
 
@@ -58,7 +59,7 @@ public class TestPDPageContentStream ext
         assertEquals(0.2f, ((COSFloat)pageTokens.get(1)).floatValue());
         assertEquals(0.3f, ((COSFloat)pageTokens.get(2)).floatValue());
         assertEquals(0.4f, ((COSFloat)pageTokens.get(3)).floatValue());
-        assertEquals("k", ((PDFOperator) pageTokens.get(4)).getOperation());
+        assertEquals("k", ((Operator) pageTokens.get(4)).getOperation());
 
         // same as above but for PDPageContentStream#setStrokingColor
         page = new PDPage();
@@ -84,6 +85,6 @@ public class TestPDPageContentStream ext
         assertEquals(0.6f, ((COSFloat)pageTokens.get(1)).floatValue());
         assertEquals(0.7f, ((COSFloat)pageTokens.get(2)).floatValue());
         assertEquals(0.8f, ((COSFloat)pageTokens.get(3)).floatValue());
-        assertEquals("K", ((PDFOperator)pageTokens.get(4)).getOperation());
+        assertEquals("K", ((Operator)pageTokens.get(4)).getOperation());
     }
 }

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/TestOptionalContentGroups.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/TestOptionalContentGroups.java?rev=1610021&r1=1609836&r2=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/TestOptionalContentGroups.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/TestOptionalContentGroups.java Sat Jul 12 18:35:46 2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox.pdmodel.graphics.optional_content;
+package org.apache.pdfbox.pdmodel.graphics.optionalcontent;
 
 import java.awt.Color;
 import java.io.File;
@@ -32,7 +32,7 @@ import org.apache.pdfbox.pdmodel.PDResou
 import org.apache.pdfbox.pdmodel.edit.PDPageContentStream;
 import org.apache.pdfbox.pdmodel.font.PDFont;
 import org.apache.pdfbox.pdmodel.font.PDType1Font;
-import org.apache.pdfbox.pdmodel.graphics.optional_content.PDOptionalContentProperties.BaseState;
+import org.apache.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentProperties.BaseState;
 import org.apache.pdfbox.pdmodel.PDPropertyList;
 
 /**

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/TestLayerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/TestLayerUtility.java?rev=1610021&r1=1610020&r2=1610021&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/TestLayerUtility.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/TestLayerUtility.java Sat Jul 12 18:35:46 2014
@@ -33,8 +33,8 @@ import org.apache.pdfbox.pdmodel.edit.PD
 import org.apache.pdfbox.pdmodel.font.PDFont;
 import org.apache.pdfbox.pdmodel.font.PDType1Font;
 import org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject;
-import org.apache.pdfbox.pdmodel.graphics.optional_content.PDOptionalContentGroup;
-import org.apache.pdfbox.pdmodel.graphics.optional_content.PDOptionalContentProperties;
+import org.apache.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentGroup;
+import org.apache.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentProperties;
 import org.apache.pdfbox.pdmodel.PDPropertyList;
 
 /**

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightContentStream.java?rev=1610021&r1=1610020&r2=1610021&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightContentStream.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightContentStream.java Sat Jul 12 18:35:46 2014
@@ -48,7 +48,8 @@ import org.apache.pdfbox.preflight.Valid
 import org.apache.pdfbox.preflight.exception.ValidationException;
 import org.apache.pdfbox.preflight.font.container.FontContainer;
 import org.apache.pdfbox.preflight.font.util.GlyphException;
-import org.apache.pdfbox.util.operator.PDFOperator;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.Operator;
 import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 public class PreflightContentStream extends PreflightStreamEngine
@@ -139,7 +140,7 @@ public class PreflightContentStream exte
      * 
      * @see org.apache.pdfbox.util.PDFStreamEngine#processOperator(org.apache.pdfbox .util.PDFOperator, java.util.List)
      */
-    protected void processOperator(PDFOperator operator, List arguments) throws IOException
+    protected void processOperator(Operator operator, List arguments) throws IOException
     {
         /*
          * Here is a copy of the super method because the else block is different. (If the operator is unknown, throw an
@@ -185,7 +186,7 @@ public class PreflightContentStream exte
      * @throws ContentStreamException
      * @throws IOException
      */
-    protected void checkShowTextOperators(PDFOperator operator, List<?> arguments) throws ContentStreamException,
+    protected void checkShowTextOperators(Operator operator, List<?> arguments) throws ContentStreamException,
             IOException
     {
         String op = operator.getOperation();
@@ -211,7 +212,7 @@ public class PreflightContentStream exte
      * @throws ContentStreamException
      * @throws IOException
      */
-    private void validStringDefinition(PDFOperator operator, List<?> arguments) throws ContentStreamException,
+    private void validStringDefinition(Operator operator, List<?> arguments) throws ContentStreamException,
             IOException
     {
         /*
@@ -274,7 +275,7 @@ public class PreflightContentStream exte
      * @throws ContentStreamException
      * @throws IOException
      */
-    private void validStringArray(PDFOperator operator, List<?> arguments) throws ContentStreamException, IOException
+    private void validStringArray(Operator operator, List<?> arguments) throws ContentStreamException, IOException
     {
         for (Object object : arguments)
         {

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java?rev=1610021&r1=1610020&r2=1610021&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java Sat Jul 12 18:35:46 2014
@@ -55,38 +55,38 @@ import org.apache.pdfbox.preflight.graph
 import org.apache.pdfbox.preflight.utils.COSUtils;
 import org.apache.pdfbox.preflight.utils.FilterHelper;
 import org.apache.pdfbox.preflight.utils.RenderingIntents;
-import org.apache.pdfbox.util.operator.PDFOperator;
+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.operator.BeginText;
-import org.apache.pdfbox.util.operator.Concatenate;
-import org.apache.pdfbox.util.operator.EndText;
-import org.apache.pdfbox.util.operator.GRestore;
-import org.apache.pdfbox.util.operator.GSave;
-import org.apache.pdfbox.util.operator.Invoke;
-import org.apache.pdfbox.util.operator.MoveText;
-import org.apache.pdfbox.util.operator.MoveTextSetLeading;
-import org.apache.pdfbox.util.operator.NextLine;
+import org.apache.pdfbox.util.operator.text.BeginText;
+import org.apache.pdfbox.util.operator.state.Concatenate;
+import org.apache.pdfbox.util.operator.text.EndText;
+import org.apache.pdfbox.util.operator.state.Restore;
+import org.apache.pdfbox.util.operator.state.Save;
+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.OperatorProcessor;
-import org.apache.pdfbox.util.operator.SetCharSpacing;
-import org.apache.pdfbox.util.operator.SetHorizontalTextScaling;
-import org.apache.pdfbox.util.operator.SetLineCapStyle;
-import org.apache.pdfbox.util.operator.SetLineDashPattern;
-import org.apache.pdfbox.util.operator.SetLineJoinStyle;
-import org.apache.pdfbox.util.operator.SetLineWidth;
-import org.apache.pdfbox.util.operator.SetMatrix;
-import org.apache.pdfbox.util.operator.SetNonStrokingDeviceCMYKColor;
-import org.apache.pdfbox.util.operator.SetNonStrokingColor;
-import org.apache.pdfbox.util.operator.SetNonStrokingColorSpace;
-import org.apache.pdfbox.util.operator.SetNonStrokingDeviceRGBColor;
-import org.apache.pdfbox.util.operator.SetStrokingDeviceCMYKColor;
-import org.apache.pdfbox.util.operator.SetStrokingColor;
-import org.apache.pdfbox.util.operator.SetStrokingColorSpace;
-import org.apache.pdfbox.util.operator.SetStrokingDeviceRGBColor;
-import org.apache.pdfbox.util.operator.SetTextFont;
-import org.apache.pdfbox.util.operator.SetTextLeading;
-import org.apache.pdfbox.util.operator.SetTextRenderingMode;
-import org.apache.pdfbox.util.operator.SetTextRise;
-import org.apache.pdfbox.util.operator.SetWordSpacing;
+import org.apache.pdfbox.util.operator.text.SetCharSpacing;
+import org.apache.pdfbox.util.operator.text.SetHorizontalTextScaling;
+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.SetLineWidth;
+import org.apache.pdfbox.util.operator.state.SetMatrix;
+import org.apache.pdfbox.util.operator.color.SetNonStrokingDeviceCMYKColor;
+import org.apache.pdfbox.util.operator.color.SetNonStrokingColor;
+import org.apache.pdfbox.util.operator.color.SetNonStrokingColorSpace;
+import org.apache.pdfbox.util.operator.color.SetNonStrokingDeviceRGBColor;
+import org.apache.pdfbox.util.operator.color.SetStrokingDeviceCMYKColor;
+import org.apache.pdfbox.util.operator.color.SetStrokingColor;
+import org.apache.pdfbox.util.operator.color.SetStrokingColorSpace;
+import org.apache.pdfbox.util.operator.color.SetStrokingDeviceRGBColor;
+import org.apache.pdfbox.util.operator.text.SetTextFont;
+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;
 
 /**
  * This class inherits from org.apache.pdfbox.util.PDFStreamEngine to allow the validation of specific rules in
@@ -121,7 +121,7 @@ public abstract class PreflightStreamEng
         registerOperatorProcessor("CS", new SetStrokingColorSpace());
         registerOperatorProcessor("cs", new SetNonStrokingColorSpace());
         registerOperatorProcessor("d", new SetLineDashPattern());
-        registerOperatorProcessor("Do", new Invoke());
+        registerOperatorProcessor("Do", new DrawObject());
 
         registerOperatorProcessor("j", new SetLineJoinStyle());
         registerOperatorProcessor("J", new SetLineCapStyle());
@@ -137,8 +137,8 @@ public abstract class PreflightStreamEng
         registerOperatorProcessor("scn", new SetNonStrokingColor());
 
         // Graphics state
-        registerOperatorProcessor("Q", new GRestore());
-        registerOperatorProcessor("q", new GSave());
+        registerOperatorProcessor("Q", new Restore());
+        registerOperatorProcessor("q", new Save());
 
         // Text operators
         registerOperatorProcessor("BT", new BeginText());
@@ -230,7 +230,7 @@ public abstract class PreflightStreamEng
      * @throws ContentStreamException
      *             ERROR_GRAPHIC_UNEXPECTED_VALUE_FOR_KEY if the operand is invalid
      */
-    protected void validRenderingIntent(PDFOperator operator, List arguments) throws ContentStreamException
+    protected void validRenderingIntent(Operator operator, List arguments) throws ContentStreamException
     {
         if ("ri".equals(operator.getOperation()))
         {
@@ -259,7 +259,7 @@ public abstract class PreflightStreamEng
      * @param operator
      * @throws ContentStreamException
      */
-    protected void validNumberOfGraphicStates(PDFOperator operator) throws ContentStreamException
+    protected void validNumberOfGraphicStates(Operator operator) throws ContentStreamException
     {
         if ("q".equals(operator.getOperation()))
         {
@@ -278,7 +278,7 @@ public abstract class PreflightStreamEng
      * @param operator the InlinedImage object (BI to EI)
      * @throws ContentStreamException
      */
-    protected void validImageFilter(PDFOperator operator) throws ContentStreamException
+    protected void validImageFilter(Operator operator) throws ContentStreamException
     {
         COSDictionary dict = operator.getImageParameters();
         /*
@@ -296,7 +296,7 @@ public abstract class PreflightStreamEng
      * @param operator the InlinedImage object (BI to EI)
      * @throws ContentStreamException
      */
-    protected void validImageColorSpace(PDFOperator operator) throws IOException
+    protected void validImageColorSpace(Operator operator) throws IOException
     {
         COSDictionary dict = operator.getImageParameters();
 
@@ -507,7 +507,7 @@ public abstract class PreflightStreamEng
      * @param arguments
      * @throws IOException
      */
-    protected void checkSetColorSpaceOperators(PDFOperator operator, List<?> arguments) throws IOException
+    protected void checkSetColorSpaceOperators(Operator operator, List<?> arguments) throws IOException
     {
         if (!("CS".equals(operator.getOperation()) || "cs".equals(operator.getOperation())))
         {

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/StubOperator.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/StubOperator.java?rev=1610021&r1=1610020&r2=1610021&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/StubOperator.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/StubOperator.java Sat Jul 12 18:35:46 2014
@@ -44,7 +44,8 @@ import org.apache.pdfbox.cos.COSFloat;
 import org.apache.pdfbox.cos.COSInteger;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSString;
-import org.apache.pdfbox.util.operator.PDFOperator;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.Operator;
 import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 /**
@@ -61,7 +62,7 @@ public class StubOperator extends Operat
      * java.util.List)
      */
     @Override
-    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         String op = operator.getOperation();
         if ("S".equals(op))

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PreflightType3Stream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PreflightType3Stream.java?rev=1610021&r1=1610020&r2=1610021&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PreflightType3Stream.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PreflightType3Stream.java Sat Jul 12 18:35:46 2014
@@ -35,7 +35,8 @@ import org.apache.pdfbox.pdmodel.common.
 import org.apache.pdfbox.pdmodel.graphics.image.PDInlineImage;
 import org.apache.pdfbox.preflight.PreflightContext;
 import org.apache.pdfbox.preflight.content.PreflightStreamEngine;
-import org.apache.pdfbox.util.operator.PDFOperator;
+import org.apache.pdfbox.util.operator.Operator;
+import org.apache.pdfbox.util.operator.Operator;
 
 /**
  * This class is used to parse a glyph of a Type3 font program. If the glyph is parsed without error, the width of the
@@ -82,7 +83,7 @@ public class PreflightType3Stream extend
      * @throws IOException
      *             If there is an error processing the operation.
      */
-    protected void processOperator(PDFOperator operator, List arguments) throws IOException
+    protected void processOperator(Operator operator, List arguments) throws IOException
     {
         super.processOperator(operator, arguments);
         String operation = operator.getOperation();



Mime
View raw message