]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2296: SVG fill pattern not visible with encryption; patch submitted by Simon...
authorLuis Bernardo <lbernardo@apache.org>
Wed, 16 Oct 2013 23:31:17 +0000 (23:31 +0000)
committerLuis Bernardo <lbernardo@apache.org>
Wed, 16 Oct 2013 23:31:17 +0000 (23:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1532940 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/pdf/PDFPattern.java

index 46a6a73781f8db62f4831ef811eded874d978c4d..b9e042815c1c7df519ec072bec98735be3c4ec60 100644 (file)
@@ -269,13 +269,14 @@ public class PDFPattern extends PDFPathPaint {
                 pdfStream = new PDFStream();
                 pdfStream.setDocument(getDocumentSafely());
                 pdfStream.add(this.patternDataStream.toString());
+                pdfStream.setObjectNumber(getObjectNumber());
                 pdfStream.getFilterList().addDefaultFilters(
                         getDocument().getFilterMap(),
                         PDFFilterList.CONTENT_FILTER);
+                getDocument().applyEncryption(pdfStream);
                 encodedStream = pdfStream.encodeStream();
                 p.append(pdfStream.getFilterList().buildFilterDictEntries());
-                p.append("/Length " + (encodedStream.getSize() + 1)
-                         + " \n");
+                p.append("/Length " + encodedStream.getSize() + " \n");
             }
 
         } else {