aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/pdf/AbstractPDFStream.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/pdf/AbstractPDFStream.java')
-rw-r--r--src/java/org/apache/fop/pdf/AbstractPDFStream.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/pdf/AbstractPDFStream.java b/src/java/org/apache/fop/pdf/AbstractPDFStream.java
index 1e1f1f259..fc853b512 100644
--- a/src/java/org/apache/fop/pdf/AbstractPDFStream.java
+++ b/src/java/org/apache/fop/pdf/AbstractPDFStream.java
@@ -47,13 +47,21 @@ public abstract class AbstractPDFStream extends PDFDictionary {
* from outside.
*/
protected void setupFilterList() {
+ addDefaultFilter(PDFFilterList.DEFAULT_FILTER);
+ prepareImplicitFilters();
+ getDocument().applyEncryption(this);
+ }
+
+ /**
+ * Adds the default filter to the filter list if the filter list hasn't been initialized, yet.
+ * @param filterName the name of the default filter to use
+ */
+ protected void addDefaultFilter(String filterName) {
if (!getFilterList().isInitialized()) {
getFilterList().addDefaultFilters(
getDocumentSafely().getFilterMap(),
- PDFFilterList.DEFAULT_FILTER);
+ filterName);
}
- prepareImplicitFilters();
- getDocument().applyEncryption(this);
}
/**