You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pdfencryption.xml 8.7KB

Merged revisions 634215-638841 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ................ r635508 | jeremias | 2008-03-10 11:06:37 +0100 (Mo, 10 Mrz 2008) | 4 lines Fixed NPE in BlockContainerLayoutManager when used as a child of an inline-level FO. Split IP and BP stack limits in LayoutContext (there's now a certain amount of redundancy with "refIPD" in LayoutContext which I didn't resolve). Areas are now generated for block-level FOs when used as children of inline-level FOs. ClassCastException in ListLayoutManager.mustKeepTogether() fixed (occured if used as child of an inline-level FO). ................ r635686 | vhennebert | 2008-03-10 21:52:43 +0100 (Mo, 10 Mrz 2008) | 2 lines Bugfix: forced break ignored when the minimum height of a table-row isn't reached ................ r635701 | jeremias | 2008-03-10 22:28:08 +0100 (Mo, 10 Mrz 2008) | 1 line Need to clean up after myself. ................ r635741 | jeremias | 2008-03-10 23:39:38 +0100 (Mo, 10 Mrz 2008) | 1 line Bugfix for row/body/col background painting when padding is used in the table-cells. ................ r635884 | vhennebert | 2008-03-11 12:02:27 +0100 (Di, 11 Mrz 2008) | 2 lines Fixed a copy-paste error (getPaddingStart instead of getPaddingEnd) ................ r635961 | vhennebert | 2008-03-11 16:05:27 +0100 (Di, 11 Mrz 2008) | 2 lines Forgot to add the testcase for forced break vs explicit row height in revision 635686 ................ r635967 | vhennebert | 2008-03-11 16:13:51 +0100 (Di, 11 Mrz 2008) | 2 lines Updated the disabled-testcases.xml file: re-enabled testcases which could easily be updated, removed the other ones which anyway were superseded by more complete ones ................ r636276 | vhennebert | 2008-03-12 11:51:09 +0100 (Mi, 12 Mrz 2008) | 2 lines Since compliance.ihtml is now the source file and it would cost too much to revert to an xml version, tidied the file a bit. No content change. ................ r636293 | vhennebert | 2008-03-12 13:14:51 +0100 (Mi, 12 Mrz 2008) | 2 lines Updated the compliance page. Re-added the 0.94 column since there are some noteworthy changes between the 0.94 and 0.95 versions ................ r636295 | vhennebert | 2008-03-12 13:19:15 +0100 (Mi, 12 Mrz 2008) | 3 lines Update of the documentation before the release. Added notes about improved checks and conformance in tables. ................ r636405 | vhennebert | 2008-03-12 17:25:52 +0100 (Mi, 12 Mrz 2008) | 2 lines Initialized merge tracking via "svnmerge" from the 0.95 branch ................ r636409 | vhennebert | 2008-03-12 17:36:29 +0100 (Mi, 12 Mrz 2008) | 8 lines Blocked revisions 636406 via svnmerge ........ r636406 | vhennebert | 2008-03-12 16:28:00 +0000 (Wed, 12 Mar 2008) | 2 lines Set the version to 0.95beta ........ ................ r636471 | vhennebert | 2008-03-12 20:24:05 +0100 (Mi, 12 Mrz 2008) | 2 lines Removed no longer used borderAndPaddingBPD field ................ r637057 | jeremias | 2008-03-14 12:15:24 +0100 (Fr, 14 Mrz 2008) | 2 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. ................ r637076 | vhennebert | 2008-03-14 13:22:44 +0100 (Fr, 14 Mrz 2008) | 2 lines Reverting changes of rev. 637057. I applied the changes to the 0.95 branch instead so that they make their way into the 0.95 release. I will merge them back to the Trunk via svnmerge ................ r638396 | vhennebert | 2008-03-18 16:01:43 +0100 (Di, 18 Mrz 2008) | 53 lines Merged revisions 636400-636405,636407-638388 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95 ........ r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines Updated copyright years ........ r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. Changes made by Jeremias ........ r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines Bugzilla #44412: Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before. ........ r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines Removed old image adapters. Removed support for Java 1.3 building as it didn't work anymore anyway. Added a check to require Java 1.4 for building. ........ r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines Partially reverted revision 637791: Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise. Updated the licensing info and release notes to make the changes clear. ........ r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning. ........ r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines Changed the documentation to reflect the move to Java 1.4 as a minimum requirement ........ r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines Simplified the getNextKnuthElements method a little bit ........ r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now ........ r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines Updated the probable date of the release ........ ................ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback@638943 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
Merged revisions 634215-638841 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ................ r635508 | jeremias | 2008-03-10 11:06:37 +0100 (Mo, 10 Mrz 2008) | 4 lines Fixed NPE in BlockContainerLayoutManager when used as a child of an inline-level FO. Split IP and BP stack limits in LayoutContext (there's now a certain amount of redundancy with "refIPD" in LayoutContext which I didn't resolve). Areas are now generated for block-level FOs when used as children of inline-level FOs. ClassCastException in ListLayoutManager.mustKeepTogether() fixed (occured if used as child of an inline-level FO). ................ r635686 | vhennebert | 2008-03-10 21:52:43 +0100 (Mo, 10 Mrz 2008) | 2 lines Bugfix: forced break ignored when the minimum height of a table-row isn't reached ................ r635701 | jeremias | 2008-03-10 22:28:08 +0100 (Mo, 10 Mrz 2008) | 1 line Need to clean up after myself. ................ r635741 | jeremias | 2008-03-10 23:39:38 +0100 (Mo, 10 Mrz 2008) | 1 line Bugfix for row/body/col background painting when padding is used in the table-cells. ................ r635884 | vhennebert | 2008-03-11 12:02:27 +0100 (Di, 11 Mrz 2008) | 2 lines Fixed a copy-paste error (getPaddingStart instead of getPaddingEnd) ................ r635961 | vhennebert | 2008-03-11 16:05:27 +0100 (Di, 11 Mrz 2008) | 2 lines Forgot to add the testcase for forced break vs explicit row height in revision 635686 ................ r635967 | vhennebert | 2008-03-11 16:13:51 +0100 (Di, 11 Mrz 2008) | 2 lines Updated the disabled-testcases.xml file: re-enabled testcases which could easily be updated, removed the other ones which anyway were superseded by more complete ones ................ r636276 | vhennebert | 2008-03-12 11:51:09 +0100 (Mi, 12 Mrz 2008) | 2 lines Since compliance.ihtml is now the source file and it would cost too much to revert to an xml version, tidied the file a bit. No content change. ................ r636293 | vhennebert | 2008-03-12 13:14:51 +0100 (Mi, 12 Mrz 2008) | 2 lines Updated the compliance page. Re-added the 0.94 column since there are some noteworthy changes between the 0.94 and 0.95 versions ................ r636295 | vhennebert | 2008-03-12 13:19:15 +0100 (Mi, 12 Mrz 2008) | 3 lines Update of the documentation before the release. Added notes about improved checks and conformance in tables. ................ r636405 | vhennebert | 2008-03-12 17:25:52 +0100 (Mi, 12 Mrz 2008) | 2 lines Initialized merge tracking via "svnmerge" from the 0.95 branch ................ r636409 | vhennebert | 2008-03-12 17:36:29 +0100 (Mi, 12 Mrz 2008) | 8 lines Blocked revisions 636406 via svnmerge ........ r636406 | vhennebert | 2008-03-12 16:28:00 +0000 (Wed, 12 Mar 2008) | 2 lines Set the version to 0.95beta ........ ................ r636471 | vhennebert | 2008-03-12 20:24:05 +0100 (Mi, 12 Mrz 2008) | 2 lines Removed no longer used borderAndPaddingBPD field ................ r637057 | jeremias | 2008-03-14 12:15:24 +0100 (Fr, 14 Mrz 2008) | 2 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. ................ r637076 | vhennebert | 2008-03-14 13:22:44 +0100 (Fr, 14 Mrz 2008) | 2 lines Reverting changes of rev. 637057. I applied the changes to the 0.95 branch instead so that they make their way into the 0.95 release. I will merge them back to the Trunk via svnmerge ................ r638396 | vhennebert | 2008-03-18 16:01:43 +0100 (Di, 18 Mrz 2008) | 53 lines Merged revisions 636400-636405,636407-638388 via svnmerge from https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95 ........ r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines Updated copyright years ........ r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. Changes made by Jeremias ........ r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines Bugzilla #44412: Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before. ........ r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines Removed old image adapters. Removed support for Java 1.3 building as it didn't work anymore anyway. Added a check to require Java 1.4 for building. ........ r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines Partially reverted revision 637791: Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise. Updated the licensing info and release notes to make the changes clear. ........ r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning. ........ r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines Changed the documentation to reflect the move to Java 1.4 as a minimum requirement ........ r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines Simplified the getNextKnuthElements method a little bit ........ r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now ........ r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines Updated the probable date of the release ........ ................ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ProcessingFeedback@638943 13f79535-47bb-0310-9956-ffa450edef68
16 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <?xml version="1.0" standalone="no"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
  18. <document>
  19. <header>
  20. <title>PDF encryption.</title>
  21. <version>$Revision$</version>
  22. <authors>
  23. <person name="J.Pietschmann" email="pietsch@apache.org"/>
  24. <person name="Jeremias Märki" email="jeremias@apache.org"/>
  25. </authors>
  26. </header>
  27. <body>
  28. <section>
  29. <title>Overview</title>
  30. <p>
  31. FOP supports encryption of PDF output, thanks to Patrick
  32. C. Lankswert. This feature is commonly used to prevent
  33. unauthorized viewing, printing, editing, copying text from the
  34. document and doing annotations. It is also possible to ask the
  35. user for a password in order to view the contents. Note that
  36. there already exist third party applications which can decrypt
  37. an encrypted PDF without effort and allow the aforementioned
  38. operations, therefore the degree of protection is limited.
  39. </p>
  40. <p>
  41. For further information about features and restrictions regarding PDF
  42. encryption, look at the documentation coming with Adobe Acrobat or the
  43. technical documentation on the Adobe web site.
  44. </p>
  45. </section>
  46. <section>
  47. <title>Usage (command line)</title>
  48. <p>
  49. Encryption is enabled by supplying any of the encryption related
  50. options.
  51. </p>
  52. <p>
  53. An owner password is set with the <code>-o</code> option. This
  54. password is actually used as encryption key. Many tools for
  55. PDF processing ask for this password to disregard any
  56. restriction imposed on the PDF document.
  57. </p>
  58. <p>
  59. If no owner password has been supplied but FOP was asked to apply some
  60. restrictions, a random password is used. In this case it is obviously
  61. impossiible to disregard restrictions in PDF processing tools.
  62. </p>
  63. <p>
  64. A user password, supplied with the <code>-u</code> option, will
  65. cause the PDF display software to ask the reader for this password in
  66. order to view the contents of the document. If no user password was
  67. supplied, viewing the content is not restricted.
  68. </p>
  69. <p>
  70. Further restrictions can be imposed by using the <code>-noprint</code>,
  71. <code>-nocopy</code>, <code>-noedit</code> and
  72. <code>-noannotations</code> options, which disable printing, copying
  73. text, editing in Adobe Acrobat and making annotations, respectively.
  74. </p>
  75. </section>
  76. <section>
  77. <title>Usage (embedded)</title>
  78. <p>
  79. When FOP is embedded in another Java application you need to set an
  80. options map on the renderer. These are the supported options:
  81. </p>
  82. <table>
  83. <tr>
  84. <th>Option</th>
  85. <th>Description</th>
  86. <th>Values</th>
  87. <th>Default</th>
  88. </tr>
  89. <tr>
  90. <td>ownerPassword</td>
  91. <td>The owner password</td>
  92. <td>String</td>
  93. <td/>
  94. </tr>
  95. <tr>
  96. <td>userPassword</td>
  97. <td>The user password</td>
  98. <td>String</td>
  99. <td/>
  100. </tr>
  101. <tr>
  102. <td>allowPrint</td>
  103. <td>Allows/disallows printing of the PDF</td>
  104. <td>"TRUE" or "FALSE"</td>
  105. <td>"TRUE"</td>
  106. </tr>
  107. <tr>
  108. <td>allowCopyContent</td>
  109. <td>Allows/disallows copy/paste of content</td>
  110. <td>"TRUE" or "FALSE"</td>
  111. <td>"TRUE"</td>
  112. </tr>
  113. <tr>
  114. <td>allowEditContent</td>
  115. <td>Allows/disallows editing of content</td>
  116. <td>"TRUE" or "FALSE"</td>
  117. <td>"TRUE"</td>
  118. </tr>
  119. <tr>
  120. <td>allowEditAnnotations</td>
  121. <td>Allows/disallows editing of annotations</td>
  122. <td>"TRUE" or "FALSE"</td>
  123. <td>"TRUE"</td>
  124. </tr>
  125. </table>
  126. <note>
  127. Encryption is enabled as soon as one of these options is set.
  128. </note>
  129. <p>
  130. An example to enable PDF encryption in Java code:
  131. </p>
  132. <source><![CDATA[
  133. import org.apache.fop.pdf.PDFEncryptionParams;
  134. [..]
  135. FOUserAgent userAgent = fopFactory.newFOUserAgent();
  136. useragent.getRendererOptions().put("encryption-params", new PDFEncryptionParams(
  137. null, "password", false, false, true, true));
  138. Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent);
  139. [..]]]></source>
  140. <p>
  141. The parameters for the constructor of PDFEncryptionParams are:
  142. </p>
  143. <ol>
  144. <li>userPassword: String, may be null</li>
  145. <li>ownerPassword: String, may be null</li>
  146. <li>allowPrint: true if printing is allowed</li>
  147. <li>allowCopyContent: true if copying content is allowed</li>
  148. <li>allowEditContent: true if editing content is allowed</li>
  149. <li>allowEditAnnotations: true if editing annotations is allowed</li>
  150. </ol>
  151. <p>
  152. Alternatively, you can set each value separately in the Map provided by
  153. FOUserAgent.getRendererOptions() by using the following keys:
  154. </p>
  155. <ol>
  156. <li>user-password: String</li>
  157. <li>owner-password: String</li>
  158. <li>noprint: Boolean or "true"/"false"</li>
  159. <li>nocopy: Boolean or "true"/"false"</li>
  160. <li>noedit: Boolean or "true"/"false"</li>
  161. <li>noannotations: Boolean or "true"/"false"</li>
  162. </ol>
  163. </section>
  164. <section>
  165. <title>Environment</title>
  166. <p>
  167. In order to use PDF encryption, FOP has to be compiled with
  168. cryptography support. Currently, only <a
  169. href="http://java.sun.com/j2se/1.4/docs/guide/security/jce/JCERefGuide.html">JCE</a>
  170. is supported. JCE is part of JDK 1.4. For earlier JDKs, it can
  171. be installed separately. The build process automatically
  172. detects JCE presence and installs PDF encryption support if
  173. possible, otherwise a stub is compiled in.
  174. </p>
  175. <p>
  176. Cryptography support must also be present at run time. In particular, a
  177. provider for the RC4 cipher is needed. Unfortunately, the sample JCE
  178. provider in Sun's JDK 1.4 does <strong>not</strong> provide RC4. If you
  179. get a message saying
  180. </p>
  181. <source>"Cannot find any provider supporting RC4"</source>
  182. <p>
  183. then you don't have the needed infrastructure.
  184. </p>
  185. <p>
  186. There are several commercial and a few Open Source packages which
  187. provide RC4. A pure Java implementation is produced by <a
  188. href="http://www.bouncycastle.org/">The Legion of the Bouncy
  189. Castle</a>. <a
  190. href="http://www.mozilla.org/projects/security/pki/jss/">Mozilla
  191. JSS</a> is an interface to a native implementation.
  192. </p>
  193. </section>
  194. <section id="install_crypto">
  195. <title>Installing a crypto provider</title>
  196. <p>
  197. The pure Java implementation from <a
  198. href="http://www.bouncycastle.org/">Bouncy Castle</a> is easy to
  199. install.
  200. </p>
  201. <ol>
  202. <li>
  203. Download the binary distribution for your JDK version.
  204. </li>
  205. <li>
  206. Unpack the distribution. Add the jar file to your classpath. A
  207. convenient way to use the jar on Linux is to simply drop it into the
  208. FOP lib directory, it will be automatically picked up by
  209. <code>fop.sh</code>.
  210. </li>
  211. <li>
  212. Open the <code>java.security</code> file and add<br/>
  213. <code>security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider</code>,<br/>
  214. preferably at the end of the block defining the other crypto
  215. providers. For JDK 1.4 this is detailed on <a href="http://java.sun.com/j2se/1.4/docs/guide/security/jce/JCERefGuide.html#InstallProvider">Sun's web site</a>.
  216. </li>
  217. </ol>
  218. <p>
  219. If you have any experience with Mozilla JSS or any other
  220. cryptography provider, please post it to the fop-user list.
  221. </p>
  222. </section>
  223. </body>
  224. </document>