aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2003-03-13 16:46:05 +0000
committerJeremias Maerki <jeremias@apache.org>2003-03-13 16:46:05 +0000
commit59e232cb5a6b5110d9f3d7efc994f6f59b966ebd (patch)
treece8512c9b8c8e7988d6516934a45f5f5fb21bb64 /src/java/org/apache/fop/fo
parent5e6585703dfbc54588ef4b61f9f6ec8c7fa099ee (diff)
downloadxmlgraphics-fop-59e232cb5a6b5110d9f3d7efc994f6f59b966ebd.tar.gz
xmlgraphics-fop-59e232cb5a6b5110d9f3d7efc994f6f59b966ebd.zip
Added support for PDF encryption.
Submitted by: Patrick C. Lankswert <PLankswert@InsightBB.COM> Enhanced to be disabled automatically if JCE and/or necessary algorithms are unavailable. PDF encryption doesn't work, yet. If it's enabled Acrobat will show blank pages. Don't know why, yet. See separate mail. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196089 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r--src/java/org/apache/fop/fo/FOUserAgent.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fo/FOUserAgent.java b/src/java/org/apache/fop/fo/FOUserAgent.java
index b35fd6426..713e4c535 100644
--- a/src/java/org/apache/fop/fo/FOUserAgent.java
+++ b/src/java/org/apache/fop/fo/FOUserAgent.java
@@ -63,6 +63,7 @@ import org.apache.avalon.framework.logger.LogEnabled;
import org.apache.avalon.framework.logger.Logger;
// FOP
+import org.apache.fop.pdf.PDFEncryptionParams;
import org.apache.fop.render.XMLHandler;
import org.apache.fop.render.RendererContext;
@@ -92,6 +93,7 @@ public class FOUserAgent implements LogEnabled {
private Map defaults = new java.util.HashMap();
private Map handlers = new java.util.HashMap();
private String baseURL;
+ private PDFEncryptionParams pdfEncryptionParams;
/**
* Sets the logger.
@@ -132,6 +134,24 @@ public class FOUserAgent implements LogEnabled {
}
/**
+ * Returns the parameters for PDF encryption.
+ * @return the PDF encryption parameters, null if not applicable
+ */
+ public PDFEncryptionParams getPDFEncryptionParams() {
+ return pdfEncryptionParams;
+ }
+
+ /**
+ * Sets the parameters for PDF encryption.
+ * @param pdfEncryptionParams the PDF encryption parameters, null to
+ * disable PDF encryption
+ */
+ public void setPDFEncryptionParams(PDFEncryptionParams pdfEncryptionParams) {
+ this.pdfEncryptionParams = pdfEncryptionParams;
+ }
+
+
+ /**
* Get an input stream for a reference.
* Temporary solution until API better.
* @param uri URI to access
@@ -216,5 +236,6 @@ public class FOUserAgent implements LogEnabled {
+ "No handler defined for XML: " + namespace);
}
}
+
}