From: Simon Steiner Date: Fri, 5 Jun 2015 12:57:45 +0000 (+0000) Subject: FOP-2482: Read out loud not working with 256 bit encryption and accessibility X-Git-Tag: fop-2_1~66 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9cefdb945736b7d7e90b3abbd1194aee7f480cde;p=xmlgraphics-fop.git FOP-2482: Read out loud not working with 256 bit encryption and accessibility git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1683746 13f79535-47bb-0310-9956-ffa450edef68 --- 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));