| <!-- |
| ! Licensed to the Apache Software Foundation (ASF) under one or more |
| ! contributor license agreements. See the NOTICE file distributed with |
| ! this work for additional information regarding copyright ownership. |
| ! The ASF licenses this file to You under the Apache License, Version 2.0 |
| ! (the "License"); you may not use this file except in compliance with |
| ! the License. You may obtain a copy of the License at |
| ! |
| ! http://www.apache.org/licenses/LICENSE-2.0 |
| ! |
| ! Unless required by applicable law or agreed to in writing, software |
| ! distributed under the License is distributed on an "AS IS" BASIS, |
| ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ! See the License for the specific language governing permissions and |
| ! limitations under the License. |
| !--> |
| <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"> |
| <document> |
| <header> |
| <title>Encrypt</title> |
| </header> |
| <body> |
| <section> |
| <title>Description</title> |
| <p>This application will encrypt a PDF document.</p> |
| <p>usage: java org.pdfbox.Encrypt [OPTIONS] <password> <inputfile></p> |
| <table> |
| <tr> |
| <th>Command Line Parameter</th> |
| <th>Type</th> |
| <th>Default Value</th> |
| <th>Description</th> |
| </tr> |
| <tr> |
| <td>-O <password></td> |
| <td>string</td> |
| <td>None</td> |
| <td>The owner password to the PDF, ignored if -certFile is specified.</td> |
| </tr> |
| <tr> |
| <td>-U <password></td> |
| <td>string</td> |
| <td>None</td> |
| <td>The user password to the PDF, ignored if -certFile is specified.</td> |
| </tr> |
| <tr> |
| <td>-certFile <path to certificate></td> |
| <td>string</td> |
| <td>None</td> |
| <td>Path to X.509 cert file.</td> |
| </tr> |
| <tr> |
| <td>-canAssemble <value></td> |
| <td>boolean</td> |
| <td>true</td> |
| <td>Set the assemble permission.</td> |
| </tr> |
| <tr> |
| <td>-canExtractContent <value></td> |
| <td>boolean</td> |
| <td>true</td> |
| <td>Set the extraction permission.</td> |
| </tr> |
| <tr> |
| <td>-canExtractForAccessibility <value></td> |
| <td>boolean</td> |
| <td>true</td> |
| <td>Set the extraction permission.</td> |
| </tr> |
| <tr> |
| <td>-canFillInForm <value></td> |
| <td>boolean</td> |
| <td>true</td> |
| <td>Set the fill in form permission.</td> |
| </tr> |
| <tr> |
| <td>-canModify <value></td> |
| <td>boolean</td> |
| <td>true</td> |
| <td>Set the modify permission.</td> |
| </tr> |
| <tr> |
| <td>-canModifyAnnotations <value></td> |
| <td>boolean</td> |
| <td>true</td> |
| <td>Set the modify annots permission.</td> |
| </tr> |
| <tr> |
| <td>-canPrint <value></td> |
| <td>boolean</td> |
| <td>true</td> |
| <td>Set the print permission.</td> |
| </tr> |
| <tr> |
| <td>-canPrintDegraded <value></td> |
| <td>boolean</td> |
| <td>true</td> |
| <td>Set the print degraded permission.</td> |
| </tr> |
| <tr> |
| <td>-keyLength <value></td> |
| <td>integer</td> |
| <td>40</td> |
| <td>The number of bits for the encryption key.</td> |
| </tr> |
| <tr> |
| <td><inputfile></td> |
| <td>filename</td> |
| <td>None</td> |
| <td>The PDF file to encrypt.</td> |
| </tr> |
| <tr> |
| <td>[outputfile]</td> |
| <td>filename</td> |
| <td>The output file.</td> |
| <td>The file to save the encrypted document to. If left blank then it will be the same as the input file.</td> |
| </tr> |
| </table> |
| </section> |
| </body> |
| </document> |