From: Luis Bernardo Date: Wed, 16 Oct 2013 23:31:17 +0000 (+0000) Subject: FOP-2296: SVG fill pattern not visible with encryption; patch submitted by Simon... X-Git-Tag: fop-2_0~176 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=39e331287690a4ba25b19cbf1d9af413c3e81aca;p=xmlgraphics-fop.git FOP-2296: SVG fill pattern not visible with encryption; patch submitted by Simon Steiner git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1532940 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/pdf/PDFPattern.java b/src/java/org/apache/fop/pdf/PDFPattern.java index 46a6a7378..b9e042815 100644 --- a/src/java/org/apache/fop/pdf/PDFPattern.java +++ b/src/java/org/apache/fop/pdf/PDFPattern.java @@ -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 {