summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/org/apache/fop/pdf/AbstractPDFStream.java2
-rw-r--r--test/java/org/apache/fop/pdf/ObjectStreamTestCase.java2
-rw-r--r--test/java/org/apache/fop/pdf/xref/CrossReferenceStreamTestCase.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/pdf/AbstractPDFStream.java b/src/java/org/apache/fop/pdf/AbstractPDFStream.java
index e550f7e24..67cb7b097 100644
--- a/src/java/org/apache/fop/pdf/AbstractPDFStream.java
+++ b/src/java/org/apache/fop/pdf/AbstractPDFStream.java
@@ -231,7 +231,7 @@ public abstract class AbstractPDFStream extends PDFObject {
lengthEntry = refLength;
} else {
encodedStream = encodeStream();
- lengthEntry = Integer.valueOf(encodedStream.getSize() + 1);
+ lengthEntry = encodedStream.getSize();
}
populateStreamDict(lengthEntry);
diff --git a/test/java/org/apache/fop/pdf/ObjectStreamTestCase.java b/test/java/org/apache/fop/pdf/ObjectStreamTestCase.java
index bf8fe26c8..a38df70a0 100644
--- a/test/java/org/apache/fop/pdf/ObjectStreamTestCase.java
+++ b/test/java/org/apache/fop/pdf/ObjectStreamTestCase.java
@@ -98,7 +98,7 @@ public class ObjectStreamTestCase {
expected.append(" /Type /ObjStm\n")
.append(" /N ").append(numObs).append("\n")
.append(" /First ").append(offsetsLength).append('\n')
- .append(" /Length ").append(OBJECT_CONTENT.length() * 2 + offsetsLength + 1).append('\n')
+ .append(" /Length ").append(OBJECT_CONTENT.length() * 2 + offsetsLength).append('\n')
.append(">>\n")
.append("stream\n");
int offset = 0;
diff --git a/test/java/org/apache/fop/pdf/xref/CrossReferenceStreamTestCase.java b/test/java/org/apache/fop/pdf/xref/CrossReferenceStreamTestCase.java
index e0e8aef78..82af9fe5b 100644
--- a/test/java/org/apache/fop/pdf/xref/CrossReferenceStreamTestCase.java
+++ b/test/java/org/apache/fop/pdf/xref/CrossReferenceStreamTestCase.java
@@ -123,7 +123,7 @@ public class CrossReferenceStreamTestCase extends CrossReferenceObjectTest {
.append(" /Type /XRef\n")
.append(" /Size ").append(Integer.toString(maxObjectNumber + 1)).append('\n')
.append(" /W [1 8 2]\n")
- .append(" /Length ").append(Integer.toString((maxObjectNumber + 1) * 11 + 1)).append('\n')
+ .append(" /Length ").append(Integer.toString((maxObjectNumber + 1) * 11)).append('\n')
.append(">>\n")
.append("stream\n");
stream.write(getBytes(expected));