In this chapter…

…you will learn how to redact documents. The following sections describe the redaction process:

  • Command-line options describes the command syntax and the options you can use on the command line to redact documents.
  • Redacting a PDF document shows you how to redact a document using the different command-line options.

Command-line options

This section describes the command-line options for redacting text.

Command syntax

$redaxserver -o <output> [options] input1.pdf [input2.pdf ...]

Options for redacting text — summary

Type Option Parameter Description
Preferences -pref <preferences.xml> Read preferences from a XML file
Redact -redact Redact document
-rmarkup Redact Acrobat-selected text directly
-redaxcat <categories> Only redact categories in comma-separated list
Finish -rembox Remove Redax boxes
-remall Remove all annotations

Options for redacting text — details

-pref <preferences.xml> — Read preferences from an XML file

Reads preferences for Redax boxes, redactions, and processing options from the XML file specified by preferences.xml (see example prefs.xml). Preferences are established in the RedaxESconfig utility, supplied with Redax Enterprise Server. If you do not specify a preferences file, Redax Enterprise Server applies the default Redax box and markup processing option preferences described in the table below.

Type Property Description Default
Redax Boxes Author The name of the author to be associated with Redax boxes and Full Page tags. No author
Category A redaction classification to be associated with Redax boxes and Full-Page tags. No category
Exemption An exemption code assigned to Full-Page tags and Redax boxes. No exemption code
Note A note to be associated with Redax boxes and Full-Page tags. No note
Box Color The border color of Redax boxes.

Note: This option applies to Redax boxes only; it does not apply to Full-Page tags.

Red
Markup Processing Remove brackets when finding bracketed text Indicates whether or not ot mark the brackets for removal, along with the enclosed text, during a find bracketed text operation (-fbracket). Do not mark brackets for removal

Note: If you specify a preferences file and one or more deprecated options on the command line, the settings in the preferences file will override the deprecated options. The deprecated options are described in Deprecated Command Line Options.

Note: If you are generating or editing Redax XML preference files, you may want to validate the file against the Redax preferences DTD (redaxserver.dtd) before using file with Redax Enterprise Server. Sample preference files are available in the samples/prefs folder. The DTD is referenced from within the XML file by adding the following line after the initial XML declaration, where /path/ is the location of the downloaded dtd file:

<!DOCTYPE redaxserver SYSTEM "/path/redaxserver.dtd">

-redact — Redact document

Redacts the document.

-rmarkup — Redact Acrobat-selected text directly

Redacts Acrobat-selected text directly. You must use one of the conversion options (-cm, -ch, -chc, -cs, -csc, -cu, -cuc) with the -rmarkup option. The conversion options are described in Marking Text for Redaction

-redaxcat <categories> — Only redact categories in comma-separated list

Redacts only that information which has been assigned to one or more categories. Use a comma-separated list to specify more than one category, as in the following examples. If the list contains spaces, enclose it in quotes.

Category1,Category2
"Category1, Category2"

-rembox — Remove Redax boxes

Removes Redax boxes. If you do not use either the -rembox or -remall option, Redax boxes will remain in the document. (Full-page tags are automatically removed during redaction.)

-remall — Remove all annotations

Removes all annotations, including Redax boxes. If you do not use the -remall option, annotations will remain in the document. (Full-page tags are automatically removed during redaction.)

Note: We strongly recommend that you remove all annotations before you release the redacted document, so that any identifying notes are not mistakenly released with the document.

Redacting a PDF document

After a PDF document has been marked up, it is ready for redaction. The following sections explain some of the different redaction options:

Performing a simple redaction

To redact all information marked with Redax boxes and Full-page tags, enter the following command:

$redaxserver -o <output> -redact [other options] <input.pdf>

This command redacts the information in Redax box and Full-page tags, and saves the results to the specified output file or directory. The original input.pdf file remains unchanged.

Example: Redact text in sample_marked.pdf, located in the samples directory, and save the results to simple_redaction.pdf. Use a preferences file that specifies a 50% black fill and frame for redacted areas with the exemption code centered.

In Windows:

>redaxserver -o samples\simple_redaction.pdf -redact -pref samples\prefs\black50center.xml samples\sample_marked.pdf

In UNIX:

$redaxserver -o ./samples/simple_redaction.pdf -redact -pref ./samples/prefs/black50center.xml ./samples/sample_marked.pdf

The figure below shows an example of a redacted area following execution of this command.

Redacted area with exemption code

Logging the redaction process

To create a log containing feedback about the redaction process, enter the following command:

$redaxserver -o <output> -redact -l <logfile.txt> -p [other options] <input.pdf>

This command writes progress and error messages to the screen and to the log file. The -o option must be followed by a file or directory name, and the -l option must be followed by a file name, or you won’t get the results you expect. The -l and -p options can be used separately or together in various combinations to produce different types of output (progress/error messages) in different places (screen/log file). See General Options – Redax Enterprise Server for more information.

Example: Redact text in sample_marked.pdf, located in the samples directory, and save the results to redact_and_log.pdf. Log progress and error messages to the screen and to redaction_log.txt. Use a preferences file that specifies a 50% black fill and frame for redacted areas with the exemption code centered.

In Windows:

>redaxserver -o samples\redact_and_log.pdf -redact -pref samples\prefs\black50center.xml -l samples\redaction_log.txt -p samples\sample_marked.pdf

In UNIX:

$redaxserver -o ./samples/redact_and_log.pdf -redact -pref ./samples/prefs/black50center.xml -l ./samples/redaction_log.txt -p ./samples/sample_marked.pdf

The example below shows a sample log file created after running this command.

Fri Aug 12 10:53:43 2011
c:\Appligent\RedaxServer\redaxserverapp -p -o .\samples\redax_and_log.pdf
-redact -pref .\Samples\prefs\black50center.xml -l .\Samples\redaction_log.txt .\samples\sample_marked.pdf
Version 3.1.2 Built with library version 9.1.0PlusP2c
Reading preference file: .\Samples\prefs\black50center.xml

Input file : .\samples\sample_marked.pdf
Output file : .\samples\redax_and_log.pdf
Processing: .\samples\sample_marked.pdf
Redacting document
Saving output PDF file
Saving : .\samples\redax_and_log.pdf
Done: .\samples\redax_and_log.pdf
Redax Enterprise Server completed successfully.

Redacting Acrobat-selected text directly

To convert Acrobat markup to Redax markup and then redact the marked-up text, use the -rmarkup option with one or more conversion options (-cm, -ch, -chc <string>, -cs, -csc <string>, -cu, -cuc <string>, -crem). The following scenarios are the same as those presented in Marking Text for Redaction but with the addition of the -rmarkup option.

To convert all Acrobat-highlighted, -underlined, and -crossed-out text to Redax boxes with no exemption codes and then redact the marked-up text, enter the following command:

$redaxserver -o <output> -cm -rmarkup [other options] <input.pdf>

Redax Enterprise Server searches through the document and draws a Redax box around all Acrobat-highlighted, -underlined, and -crossed-out text. If exemption codes are specified in the preferences file, they are ignored. The document is automatically marked to allow redaction without exemption codes. (Allow Redaction without Exemption does not have to be specified in the preferences file.)

Example: Convert and redact all Acrobat-highlighted, -underlined, and -crossed-out text in the sample_marked.pdf file, located in the samples directory, and save the output to mark_all_selected.pdf. Use a preferences file that specifies a blue Redax box and assigns John Jones as the author.

In Windows:

>redaxserver -o samples\mark_all_selected.pdf -cm -rmarkup -pref samples\prefs\blueJones.xml samples\sample_marked.pdf

In UNIX:

$redaxserver -o ./samples/mark_all_selected.pdf -cm -rmarkup -pref ./samples/prefs/blueJones.xml ./samples/sample_marked.pdf

To convert one or more types of Acrobat-selected text to Redax markup without exemption codes and then redact the marked-up text, enter the following command:

$redaxserver -o <output> <conversion option(s)> -rmarkup [other options] <input.pdf>

Redax Enterprise Server searches through the document. Each time it finds the type of Acrobat-selected text specified by the conversion options, it draws a Redax box around the text. If exemption codes are specified in the preferences file, they are ignored. The document is automatically marked to allow redaction without exemption. (Allow Redaction without Exemption does not have to be specified in the preferences file.)

Example: Convert and redact Acrobat-underlined and crossed-out text in the sample_marked.pdf file, located in the samples directory, and save the output to mark_undercross.pdf. Remove the underlines and crossouts, and use a preferences file that specifies a yellow Redax box.

In Windows:

>redaxserver -o samples\mark_undercross.pdf -cu -cs -crem -rmarkup -pref samples\prefs\yellowDoe.xml samples\sample_marked.pdf

In UNIX:

$redaxserver -o ./samples/mark_undercross.pdf -cu -cs -crem -rmarkup -pref ./samples/prefs/yellowDoe.xml ./samples/sample_marked.pdf

To convert one or more types of Acrobat-selected text to Redax markup with exemption codes and then redact the marked-up text, enter the following command:

$redaxserver -o <output> <conversion option(s)-exemption code> -rmarkup [other options] <input.pdf>

Redax Enterprise Server searches through the document. Each time it finds the type of Acrobat-selected text specified by the conversion options, it draws a Redax box around the text and overlays the box with the specified exemption code.

Note: If exemption codes are specified in the preferences file, they are ignored.

Example: Convert and redact Acrobat-highlighted text in the sample_marked.pdf file, located in the samples directory, and save the output to markredacted_highlighted.pdf.

Overlay the box with the Freedom of Information Act exemption code (b) (4).

In Windows:

>redaxserver -o samples\mark_highlighted.pdf -chc “(b)(4)” -rmarkup samples\sample_marked.pdf

In UNIX:

$redaxserver -o ./samples/mark_highlighted.pdf -chc “(b)(4)” -rmarkup ./samples/sample_marked.pdf

Redacting by category

When Redax boxes are assigned to categories during markup (see Creating category-based markup), you can redact the information by category with the following command:

$redaxserver -o <output> -redact  -redaxcat <categories> [other options] <input.pdf>

This command redacts only the information in Redax boxes assigned to the listed categories and saves the results to the specified output file or directory. Information in other categories is not redacted.

Example: Redact text in Redax boxes assigned to the category “Government” in mark_categories.pdf, located in the samples directory, and save the results to redact_categories.pdf. Use the preferences file noexempt.xml, which allows redaction without exemption codes.

In Windows:

>redaxserver -o samples\redact_categories.pdf  -redact -redaxcat Government -pref samples\prefs\noexempt.xml samples\mark_categories.pdf

In UNIX:

$redaxserver -o ./samples/redact_categories.pdf -redact -redaxcat Government -pref ./samples/prefs/noexempt.xml ./samples/mark_categories.pdf