]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2482: Read out loud not working with 256 bit encryption and accessibility
authorSimon Steiner <ssteiner@apache.org>
Fri, 5 Jun 2015 12:57:45 +0000 (12:57 +0000)
committerSimon Steiner <ssteiner@apache.org>
Fri, 5 Jun 2015 12:57:45 +0000 (12:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1683746 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/pdf/AbstractPDFStream.java
test/java/org/apache/fop/pdf/ObjectStreamTestCase.java
test/java/org/apache/fop/pdf/xref/CrossReferenceStreamTestCase.java

index e550f7e240b67d01db3233f70bceb4918aa500a5..67cb7b09744028f9bed5b67de5e0a83599422fba 100644 (file)
@@ -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);
index bf8fe26c8be7c80bae9ee0ecd8f21d34d59d4bc5..a38df70a094430548cbfa64247f4c6a75dfbe62d 100644 (file)
@@ -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;
index e0e8aef7849d983d3307c87b5f87b8dd24f89f8e..82af9fe5b459b506da5998a7771390a7729b37a1 100644 (file)
@@ -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));