APCrypt Command Line Option Reference

Introduction

This section describes the apcrypt command syntax and summarizes the options you can use with the apcrypt command.  Command-line syntax in the tables below refer to a path to any input or output file.  In the Windows environment, directory paths use a back slash “\” character. In the UNIX/Mac OS X environment, directory paths use a forward slash “/” character. Examples in the tables below show a Windows type path.

The following is an example of paths to the default installation directory for APCrypt:

Windows

> C:\Appligent\APCrypt\

UNIX/Mac OS X

$ /Appligent/APCrypt/

Command Syntax

$apcrypt [options] path\inFilename.pdf [inFilename.pdf...]

Product Information Options

The following table describes options you can use to obtain information about APCrypt.  For more information about these options, see Introduction to APCrypt.

Option Function Description Example
-v Print version information Displays the version of APCrypt you are running. This is important when corresponding with support@Appligent.com. In order to best understand your problem, we must know what version of the software you have. apcrypt -v
-h or
-help
Show help Displays all available command-line options, plus version information. apcrypt -h
apcrypt -help

Input and Output Options

The following table describes the options for managing file input and output. For more information about these options, see General Options – APCrypt.

Option Function Description Example
-d <oPassword> Owner password to change encryption to this document The password required to change encryption settings on a PDF document. Passwords are case sensitive.Choose passwords carefully. They should not be able to be guessed easily but at the same time should not be too difficult for you to remember. If you forget a password, there is no way to recover it from the document, therefore, it is a good idea to note passwords in another secure location. apcrypt -d oPa55w0rd
[options] path\inFilename.pdf
[inFilename.pdf…]
-u <uPassword> User password to open this document The password required to open a PDF document encrypted with a User password. Secured PDF files can have two types of passwords: User passwords and Owner passwords. A User password is also known as an Open password, because it is used to open documents. If you want your document encrypted with a User password, you must supply the password immediately following the -u option. apcrypt -u uPa55w0rd
[options] path\inFilename
-o <outFilename> Output filename Specifies a new output PDF file. The name, including the path, must immediately follow the -o option. If you want your output file to go to a particular directory, be sure it exists beforehand. This option is used if you do not want to overwrite the original file. apcrypt -ownerpass Pa55w0rd [options]
path\inFilename.pdf
-o path\out_Filename.pdf
 -w Linearize the PDF file upon save Save the output file as a linearized document. Linearization reorganizes the file to make it more efficient for web delivery. Individual pages can be rendered before the entire document has downloaded, so the user can start reading the document sooner. apcrypt -ownerpass Pa55w0rd [options]
-w path\inFilename.pdf

Reporting Options

The following table describes the options for reporting progress and error messages. These options are helpful for debugging and understanding how APCrypt works. For more information about these options, see General Options – APCrypt.

Option Function Description Example
-p Show progress Write progress messages to the screen (STDOUT—the standard output of your system). This option is helpful for debugging and for understanding how the utility works. apcrypt -p
-d oPa55w0rd [options]
path\inFilename.pdf
-l <logfile> Write progress to the given log file name Saves the progress and error messages to a user-specified text file instead of the default log file, apcrypt.log. The name of the text file must directly follow the -l option. (By default, APCrypt writes any error messages to the screen, STDOUT, and to the default log file, apcrypt.log.) apcrypt -l path\mylogfile.txt
-d oPa55w0rd [options] path\inFilename.pdf
-p and -l combined Write progress and error messages to the given log file name If the -p and -l options are both specified, progress and error messages will be written to the file that you specify. apcrypt -p
-l path\mylogfile.txt
-d oPa55w0rd [options] path\inFilename.pdf

Registration Number

The following table describes how to pass the registration number to APCrypt. For more information about this option flag, see General Options – APCrypt.

Option Function Description Example
-r <RegNum> Pass APCrypt registration number This option can be used to supply your registration number to APCrypt from a script or another application. This option is typically not necessary and is available for use in cases where the Appligent License File can not be located by the application because of runtime environment restrictions. apcryptapp -r XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
-encrypt [options] path\inFilename.pdf
-o path\outFilename.pdf

Note: Do not call the apcrypt script from another script or application. Call apcryptapp directly with the registration number option, as shown in the example above.

Encryption Options

The following table describes how to use the encryption options available with APCrypt. For more information about these options, see Applying Standard Security – APCrypt.

Option Function Description Example
-encrypt Encrypt the output file (required) Specifies applying encryption to the output PDF file. Required when applying encryption.
The owner password is required when applying encryption by using either the -d <oPassword> (If input file is already encrypted) or -ownerpass <Password> options.
apcrypt -d oPa55w0rd
-encrypt [options]
path\inFilename.pdf [inFilename.pdf…]
-ownerpass <oPassword> New owner password Specifies a new Owner password to apply encryption. An Owner password restricts you from altering the security settings. You are not prompted for a password to open the document, only if you try to change the security settings. Passwords are case sensitive. Required when applying encryption.

Choose passwords carefully. They should not be able to be guessed easily but at the same time should not be too difficult for you to remember. If you forget a password, there is no way to recover it from the document, therefore, it is a good idea to note passwords in another secure location.

apcrypt -ownerpass Pa55w0rd
-encrypt [options]
path\inFilename.pdf [inFilename.pdf…]
-userpass <uPassword> Set user password Specifies a User password for the document. Setting a User password prevents a document from being opened unless the correct password is supplied. Passwords are case sensitive. apcrypt -userpass UPa55w0rd
-encrypt [options]
path\inFilename.pdf [inFilename.pdf…]
-keylength <int> Encryption level Specifies the level of encryption applied: either 40-bit (low), 128-bit or 256-bit. Specify -keylength 40 for low level encryption.

If you do not specify key length, high level (128-bit) is applied. For 256-bit, specify -aes -keylength 256.

apcrypt -ownerpass Pa55w0rd
-encrypt -keylength 40
[options] path\inFilename.pdf [inFilename.pdf…]
-remove Remove encryption from file Removes encryption from a PDF file. Requires -d <oPassword> option. apcrypt -d Pa55w0rd
-remove path\inFilename.pdf [inFilename.pdf…]

40-bit permissions

The following table describes the security provided by 40-bit encryption options.  For more information about these options, see Applying Standard Security – APCrypt.

Option Function Description Example
-noprint Do not allow printing Specifies that the document cannot be printed. When the document is opened, the print icon on the toolbar and the Print option under the file menu will be grayed out. apcrypt -ownerpass Pa55w0rd
-encrypt -keylength 40 -noprint [options]
path\inFilename.pdf [inFilename.pdf…]
-nomodify Do not allow modifying the document Specifies that the document cannot be modified. You will not be able to modify text or pages in the document when this option is used. You can fill in form fields, or add notes or other annotations. Text can be selected for copying but cannot be cut, pasted or cleared.

With -nomodify, the following tools are grayed out and cannot be used when the document is opened in Acrobat:

Crop Tool, Movie Tool, Link Tool, Article Tool, Form Tool, Digital Signature Tool

apcrypt -ownerpass Pa55w0rd
-encrypt -keylength 40 -nomodify [options]
path\inFilename.pdf [inFilename.pdf…]
-nocopy Do not allow copying of text or graphics Specifies text and graphics cannot be copied.

With -nocopy, the following tools are grayed out and cannot be used when the document is opened in Acrobat:

Text Select Tool, Touch-Up Text Tool, Table/Formatted Text Select Tool

apcrypt -ownerpass Pa55w0rd
-encrypt -keylength 40 -nocopy [options]
path\inFilename.pdf [inFilename.pdf…]
-nonotes Do not allow adding or changing notes or form fields Specifies that annotations cannot be added or changed in the document. Annotations include notes, highlighted text, form fields and pencil marks. Annotations can be in text, graphic or audio format, or even attached external files.

With -nonotes, the following tools are grayed out and cannot be used when the document is opened in Acrobat:

Notes Tool, Sound Attachment Tool, Pencil Tool, Stamp Tool, Highlight Text Tool, File Attachment, Form Tool, Square Tool, Digital Signature Tool, Circle Tool, Free Text Tool, Line Tool

apcrypt -ownerpass Pa55w0rd
-encrypt -keylength 40 -nonotes [options]
path\inFilename.pdf [inFilename.pdf…]

128-bit and 256-bit permissions

The following table describes the additional security options provided by 128-bit encryption options.  For more information about these options, see Applying Standard Security – APCrypt.

Option Function Description Example
-noprint Do not allow printing Specifies that the document cannot be printed. When the document is opened, the print icon on the toolbar and the Print option under the file menu will be grayed out. apcrypt -ownerpass Pa55w0rd
-encrypt -noprint [options]
path\inFilename.pdf [inFilename.pdf…]
-nomodify Do not allow modifying the document Specifies that the document cannot be modified. You will not be able to modify text or pages in the document when this option is used. You can fill in form fields, or add notes or other annotations. Text can be selected for copying but cannot be cut, pasted or cleared.

With -nomodify, the following tools are grayed out and cannot be used when the document is opened in Acrobat:

Crop Tool, Movie Tool, Link Tool, Article Tool, Form Tool, Digital Signature Tool

apcrypt -ownerpass Pa55w0rd
-encrypt -nomodify [options]
path\inFilename.pdf [inFilename.pdf…]
-nocopy Do not allow copying of text or graphics Specifies text and graphics cannot be copied.

With -nocopy, the following tools are grayed out and cannot be used when the document is opened in Acrobat:

Text Select Tool, Touch-Up Text Tool, Table/Formatted Text Select Tool

apcrypt -ownerpass Pa55w0rd
-encrypt -nocopy [options]
path\inFilename.pdf [inFilename.pdf…]
-nonotes Do not allow adding or changing notes or form fields Specifies that annotations cannot be added or changed in the document. Annotations include notes, highlighted text, form fields and pencil marks. Annotations can be in text, graphic or audio format, or even attached external files.

With -nonotes, the following tools are grayed out and cannot be used when the document is opened in Acrobat:

Notes Tool, Sound Attachment Tool, Pencil Tool, Stamp Tool, Highlight Text Tool, File Attachment, Form Tool, Square Tool, Digital Signature Tool, Circle Tool, Free Text Tool, Line Tool

apcrypt -ownerpass Pa55w0rd
-encrypt -nonotes [options]
path\inFilename.pdf [inFilename.pdf…]
-noaccess Do not allow accessibility Specifies Content accessibility is not allowed. Content accessibility provides the vision- and motion-challenged community with the tools and resources to make digital information more accessible. To learn more about content accessibility, consult the Acrobat Help guide within Acrobat. apcrypt -ownerpass Pa55w0rd
-encrypt -noaccess [options]
path\inFilename.pdf [inFilename.pdf…]
-nohighres Do not allow high resolution printing Specifies low resolution printing only. Acrobat prints each page as a low resolution (150 dpi) bitmap. The document cannot be recreated from these printouts. apcrypt -ownerpass Pa55w0rd
-encrypt -nohighres [options]
path\inFilename.pdf [inFilename.pdf…]
-nofill Do not allow filling form fields or signing fields Specifies that no changes can be made to form fields or digital signature fields. This setting effectively prevents a filled in form from being changed. apcrypt -ownerpass Pa55w0rd
-encrypt -nofill [options]
path\inFilename.pdf [inFilename.pdf…]
-noassembly Do not allow document assembly Specifies that no new pages can be added and no pages can be removed from the PDF document.  Effectively prevents pages being removed from the PDF document to be used elsewhere. apcrypt -ownerpass Pa55w0rd
-encrypt -noassembly [options]
path\inFilename.pdf [inFilename.pdf…]