You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by le...@apache.org on 2019/04/19 12:24:51 UTC
svn commit: r1857802 [2/2] - in /pdfbox/branches/2.0: ./ pdfbox/
pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/
pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/color/
pdfbox/src/main/java/org/apache/pdfbox/contentstream/op...
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetTextRenderingMode.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetTextRenderingMode.java?rev=1857802&r1=1857801&r2=1857802&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetTextRenderingMode.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetTextRenderingMode.java Fri Apr 19 12:24:50 2019
@@ -21,6 +21,7 @@ import java.util.List;
import org.apache.pdfbox.contentstream.operator.MissingOperandException;
import org.apache.pdfbox.contentstream.operator.Operator;
+import org.apache.pdfbox.contentstream.operator.OperatorName;
import org.apache.pdfbox.contentstream.operator.OperatorProcessor;
import org.apache.pdfbox.cos.COSBase;
import org.apache.pdfbox.cos.COSNumber;
@@ -36,7 +37,7 @@ public class SetTextRenderingMode extend
@Override
public void process(Operator operator, List<COSBase> arguments) throws IOException
{
- if (arguments.size() < 1)
+ if (arguments.isEmpty())
{
throw new MissingOperandException(operator, arguments);
}
@@ -58,6 +59,6 @@ public class SetTextRenderingMode extend
@Override
public String getName()
{
- return "Tr";
+ return OperatorName.SET_TEXT_RENDERINGMODE;
}
}
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetTextRise.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetTextRise.java?rev=1857802&r1=1857801&r2=1857802&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetTextRise.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetTextRise.java Fri Apr 19 12:24:50 2019
@@ -21,6 +21,7 @@ import java.util.List;
import org.apache.pdfbox.cos.COSBase;
import org.apache.pdfbox.cos.COSNumber;
import org.apache.pdfbox.contentstream.operator.Operator;
+import org.apache.pdfbox.contentstream.operator.OperatorName;
import org.apache.pdfbox.contentstream.operator.OperatorProcessor;
import java.io.IOException;
@@ -35,7 +36,7 @@ public class SetTextRise extends Operato
@Override
public void process(Operator operator, List<COSBase> arguments) throws IOException
{
- if (arguments.size() < 1)
+ if (arguments.isEmpty())
{
return;
}
@@ -51,6 +52,6 @@ public class SetTextRise extends Operato
@Override
public String getName()
{
- return "Ts";
+ return OperatorName.SET_TEXT_RISE;
}
}
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetWordSpacing.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetWordSpacing.java?rev=1857802&r1=1857801&r2=1857802&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetWordSpacing.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/SetWordSpacing.java Fri Apr 19 12:24:50 2019
@@ -21,6 +21,7 @@ import java.util.List;
import org.apache.pdfbox.cos.COSBase;
import org.apache.pdfbox.cos.COSNumber;
import org.apache.pdfbox.contentstream.operator.Operator;
+import org.apache.pdfbox.contentstream.operator.OperatorName;
import org.apache.pdfbox.contentstream.operator.OperatorProcessor;
/**
@@ -33,7 +34,7 @@ public class SetWordSpacing extends Oper
@Override
public void process(Operator operator, List<COSBase> arguments)
{
- if (arguments.size() < 1)
+ if (arguments.isEmpty())
{
return;
}
@@ -49,6 +50,6 @@ public class SetWordSpacing extends Oper
@Override
public String getName()
{
- return "Tw";
+ return OperatorName.SET_WORD_SPACING;
}
}
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowText.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowText.java?rev=1857802&r1=1857801&r2=1857802&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowText.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowText.java Fri Apr 19 12:24:50 2019
@@ -21,6 +21,7 @@ import java.util.List;
import org.apache.pdfbox.cos.COSBase;
import org.apache.pdfbox.cos.COSString;
import org.apache.pdfbox.contentstream.operator.Operator;
+import org.apache.pdfbox.contentstream.operator.OperatorName;
import org.apache.pdfbox.contentstream.operator.OperatorProcessor;
import java.io.IOException;
@@ -35,7 +36,7 @@ public class ShowText extends OperatorPr
@Override
public void process(Operator operator, List<COSBase> arguments) throws IOException
{
- if (arguments.size() < 1)
+ if (arguments.isEmpty())
{
// ignore ( )Tj
return;
@@ -58,6 +59,6 @@ public class ShowText extends OperatorPr
@Override
public String getName()
{
- return "Tj";
+ return OperatorName.SHOW_TEXT;
}
}
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextAdjusted.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextAdjusted.java?rev=1857802&r1=1857801&r2=1857802&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextAdjusted.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextAdjusted.java Fri Apr 19 12:24:50 2019
@@ -22,6 +22,7 @@ import org.apache.pdfbox.cos.COSArray;
import org.apache.pdfbox.cos.COSBase;
import java.io.IOException;
import org.apache.pdfbox.contentstream.operator.Operator;
+import org.apache.pdfbox.contentstream.operator.OperatorName;
import org.apache.pdfbox.contentstream.operator.OperatorProcessor;
/**
@@ -34,7 +35,7 @@ public class ShowTextAdjusted extends Op
@Override
public void process(Operator operator, List<COSBase> arguments) throws IOException
{
- if (arguments.size() < 1)
+ if (arguments.isEmpty())
{
return;
}
@@ -55,6 +56,6 @@ public class ShowTextAdjusted extends Op
@Override
public String getName()
{
- return "TJ";
+ return OperatorName.SHOW_TEXT_ADJUSTED;
}
}
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextLine.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextLine.java?rev=1857802&r1=1857801&r2=1857802&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextLine.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextLine.java Fri Apr 19 12:24:50 2019
@@ -20,6 +20,7 @@ import java.util.List;
import org.apache.pdfbox.cos.COSBase;
import org.apache.pdfbox.contentstream.operator.Operator;
+import org.apache.pdfbox.contentstream.operator.OperatorName;
import org.apache.pdfbox.contentstream.operator.OperatorProcessor;
import java.io.IOException;
@@ -34,13 +35,13 @@ public class ShowTextLine extends Operat
@Override
public void process(Operator operator, List<COSBase> arguments) throws IOException
{
- context.processOperator("T*", null);
- context.processOperator("Tj", arguments);
+ context.processOperator(OperatorName.NEXT_LINE, null);
+ context.processOperator(OperatorName.SHOW_TEXT, arguments);
}
@Override
public String getName()
{
- return "'";
+ return OperatorName.SHOW_TEXT_LINE;
}
}
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextLineAndSpace.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextLineAndSpace.java?rev=1857802&r1=1857801&r2=1857802&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextLineAndSpace.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/ShowTextLineAndSpace.java Fri Apr 19 12:24:50 2019
@@ -20,6 +20,7 @@ import java.util.List;
import org.apache.pdfbox.cos.COSBase;
import org.apache.pdfbox.contentstream.operator.Operator;
+import org.apache.pdfbox.contentstream.operator.OperatorName;
import org.apache.pdfbox.contentstream.operator.OperatorProcessor;
import java.io.IOException;
@@ -39,14 +40,14 @@ public class ShowTextLineAndSpace extend
{
throw new MissingOperandException(operator, arguments);
}
- context.processOperator("Tw", arguments.subList(0,1));
- context.processOperator("Tc", arguments.subList(1,2));
- context.processOperator("'", arguments.subList(2,3));
+ context.processOperator(OperatorName.SET_WORD_SPACING, arguments.subList(0, 1));
+ context.processOperator(OperatorName.SET_CHAR_SPACING, arguments.subList(1, 2));
+ context.processOperator(OperatorName.SHOW_TEXT_LINE, arguments.subList(2, 3));
}
@Override
public String getName()
{
- return "\"";
+ return OperatorName.SHOW_TEXT_LINE_AND_SPACE;
}
}