Marking Text for Redaction
In this chapter...
...you will learn how to mark up a document for redaction using Redax Enterprise Server. The following sections describe the markup process:
- Marking up a document shows you all the tools available to mark a document for redaction.
- Command-line options describes the command syntax and the options you can use on the command line to mark information for redaction.
Marking up a document
You can mark a document for redaction in the following ways:
- Mark all text between square brackets [ ] — Mark the text between every set of square brackets in the documents.
- Mark one or more pages — Mark an entire page or a list of pages.
- Convert Acrobat-selected text to Redax boxes — Convert text that you select with the Acrobat Highlight, Underline, and Cross Out/Strikethrough tools to Redax boxes. Each Acrobat selection type can have its own exemption code.
- Use a redaction list file — Mark all occurrences of text matching the words and phrases in the list.
- Use a pre-defined pattern file — Mark all occurrences of text matching one of a pre-defined set of patterns NEW in 3.0.
- Use any regular expression — Mark occurrences of text matching your preferred regular expression NEW in 3.0.
- Mark by category — Place Redax markup in one or more categories, as defined in a preferences file.
- Mark images — Mark all bitmap images or all vector images.
Note: Once you have marked a document for redaction, you can use it as a template to mark up other documents in which the information to be marked up is in the same position on the page. For more information, see Import & Export Markup with RESxml.
When text is marked for redaction, a Redax box is placed around it, as in the following example:
![]()
When a page is marked for redaction, a Full-page tag is placed on the page, as in the following example:

Redax boxes and Full-page tags are visible in Adobe Acrobat and can be printed from Acrobat to a PostScript or non-PostScript printer. The markup can be adjusted, if necessary, using the Redax plug-in.
Marking all text between square brackets
To mark all text that is between square brackets, enter the following command:
$redaxserver -o <output> -fbracket [other options] <input.pdf>
Redax Enterprise Server searches through the document. Each time it finds text that’s contained between square brackets [ ], it draws a Redax box around the text.
Whether or not the brackets are also included in the Redax box depends on your preferences file. (See Remove Brackets when Find Bracketed Text in Appendix B: RedaxESconfig is selected.) If you do not designate a preferences file, the brackets will not be included in the Redax box and will, therefore, not be removed during redaction.
Note: In your preferences file, you should either specify an exemption code or, if you do not wish to use exemption codes, check Allow Redaction without Exemption.
Example: Mark bracketed text in the sample_base.pdf file, located in the samples directory, and save the output to mark_bracketed.pdf. Use a preferences file that specifies to mark the brackets for removal, as well as the text (in other words, to include the brackets in the Redax box).
In Windows:
>redaxserver -o samples\mark_bracketed.pdf -fbracket -pref samples\prefs\remove_brackets.xml samples\sample_base.pdf
In UNIX:
$redaxserver -o ./samples/mark_bracketed.pdf -fbracket -pref ./samples/prefs/remove_brackets.xml ./samples/sample_base.pdf
Marking one or more pages
To mark one or more pages for redaction, enter the following command:
$redaxserver -o <output> -markpages <pages> [other options] <input.pdf>
For pages, substitute a single page or a list of pages. In a list of pages, use a comma to separate individual pages or a dash to indicate a range of pages. If you include spaces, enclose the list in quotes.
When the command is executed, Redax Enterprise Server places a Full-Page tag on each listed page in the input.pdf file and saves the results to the specified output file or directory.
Example: Mark pages 1, 3, and 5-7 in the sample_base.pdf file, located in the samples directory, and save the output to mark_pages.pdf. Use a preferences file that specifies an exemption code of Confidential. You can use the sample file, confidential.xml, located in the samples directory or you can create your own preference file using RedaxESconfig, which is supplied with Redax Enterprise Server. When you open mark_pages.pdf, you can display the exemption code by double-clicking in the Full-Page tag. In Acrobat, you can also display it as a tooltip when you move the pointer over the Full-Page tag.
In Windows:
>redaxserver -o samples\mark_pages.pdf -markpages 1,3,5-7 -pref samples\prefs\confidential.xml samples\sample_base.pdf
In UNIX:
$redaxserver -o ./samples/mark_pages.pdf -markpages 1,3,5-7 -pref ./samples/prefs/confidential.xml ./samples/sample_base.pdf
Converting Acrobat-selected text to Redax boxes
Redax Enterprise Server can convert Acrobat-highlighted, -underlined, and -crossed-out text to Redax boxes. The text should be selected in Acrobat beforehand, as described in Using Acrobat to select text for redaction. (You can also redact the Acrobat-selected text at the same time. See Redacting Documents for information).
You have several conversion options.
To convert all Acrobat-highlighted, -underlined, and -crossed-out text to Redax boxes, with no exemption codes, enter the following command:
$redaxserver -o <output> -cm [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. Unless an exemption code is specified in the preferences file, exemption codes are not assigned to the Redax boxes, and 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 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 -pref samples\prefs\blueJones.xml samples\sample_marked.pdf
In UNIX:
>$redaxserver -o ./samples/mark_all_selected.pdf -cm -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, enter the following command:
$redaxserver -o <output> <conversion option(s)-no exemption code> [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. Unless an exemption code is specified in the preferences file, exemption codes are not assigned to the Redax boxes, and 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 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 (YellowDoe.xml) that specifies a yellow Redax box and assigns Jane Doe as the author.
In Windows:
>redaxserver -o samples\mark_undercross.pdf -cu -cs -crem -pref samples\prefs\yellowDoe.xml samples\sample_marked.pdf
In UNIX:
$redaxserver -o ./samples/mark_undercross.pdf -cu -cs -crem -pref ./samples/prefs/yellowDoe.xml ./samples/sample_marked.pdf
To convert one or more types of Acrobat-selected text to Redax markup without exemption codes, enter the following command:
$redaxserver -o <output> <conversion option(s)-exemption code> [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 Acrobat-highlighted text in the sample_marked.pdf file, located in the samples directory, and save the output to mark_highlighted.pdf. Overlay the box with the Freedom of Information Act exemption code (b) (4).
In Windows:
>redaxserver -o samples\mark_highlight.pdf -ch -chc (b)(4) -crem -pref samples\prefs\yellowDoe.xml samples\sample_marked.pdf
In UNIX:
$redaxserver -o ./samples/mark_highlight.pdf -ch -chc (b)(4) -crem -pref ./samples/prefs/yellowDoe.xml ./samples/sample_marked.pdf
Lists, Patterns and Regular Expressions
ADVISORY: The quality and internal structure of PDF files can vary greatly. Consequently, no warranty is offered with respect to the accuracy with which lists, patterns or regular expression lists used with Redax Enterprise Server will locate and mark text. Appligent Document Solutions always recommends a visual review of marked-up documents prior to redaction and release.
Using a list file to mark text
To mark the text in a PDF document that matches the words and phrases in a list file, enter the following command:
$redaxserver -o <output> -flist <listfile.txt> [other options] <input.pdf>
Refer to Creating list files to learn how to create a list file.
Note: If you want the search to be case-insensitive, specify the -ignorecase option.
Redax Enterprise Server searches through the document. Each time it finds text specified for redaction in the list file, it draws a Redax box around the text and overlays the box with the corresponding exemption code from the list file.
Example: Mark text in sample_base.pdf that matches the words and phrases in sample_find_list.txt (both files are in the samples directory), and apply the exemption codes specified in sample_find_list.txt. Perform a case-insensitive search to find all matching text, regardless of capitalization.
In Windows:
>redaxserver -o samples\mark_listed.pdf -flist samples\sample_find_list.txt -ignorecase samples\sample_base.pdf
In UNIX:
$redaxserver -o ./samples/mark_listed.pdf -flist ./samples/sample_find_list.txt -ignorecase ./samples/sample_base.pdf
A segment of the output for this example is displayed in the figure below.

Using a pattern file to mark text
Pattern files are plain text files including items from the Available Patterns List. To develop your own patterns, use a regular expression list file.
To set an exemption code for a specific -fpattern operation, use a preferences file with your desired exemption code set as the default. See Appendix B: RedaxESconfig for more information on creating preferences files for Redax Enterprise Server.
To mark the text in a PDF document that matches the patterns in a pattern file, enter the following command:
$redaxserver -o <output> -fpattern <pattern_listfile.txt> [other options] <input.pdf>
Redax Enterprise Server searches through the document. Each time it finds text specified for redaction in the sample_pattern_list.txt, it draws a Redax box around the text and overlays the box with the exemption code defined in the preferences XML file for the current process. See Appendix B: RedaxESconfig for more information on creating preferences files.
Example: Mark text in sample_base.pdf that matches the patterns in sample_pattern_list.txt (both files are in the samples directory), and apply the exemption codes specified therein.
In Windows:
>redaxserver -o samples\mark_listed.pdf -fpattern samples\sample_pattern_list.txt -ignorecase samples\sample_base.pdf
In UNIX:
$redaxserver -o ./samples/mark_listed.pdf -fpattern ./samples/sample_pattern_list.txt -ignorecase ./samples/sample_base.pdf
A segment of the output for this example is displayed in the figure below. The pattern file is setup to find "Date". If you wish to search on any other built-in pattern, remove the # sign in front of the pattern name in the sample_pattern_list.txt file.

Available Patterns
The patterns provided with Redax Enterprise Server are:
-
Credit Card
-
Date
-
Date numeric period-separated (12.08.2010)
-
Date numeric space-separated (12 08 2010)
-
Email
-
Postal Code Australia
-
Postal Code Brazil
-
Postal Code Canada
-
Postal Code Denmark
-
Postal Code France
-
Postal Code Germany
-
Postal Code India
-
Postal Code Netherlands
-
Postal Code Russia
-
Postal Code Spain
-
Postal Code USA
-
Postal Code United Kingdom
-
Social Security number
-
Telephone # Australia
-
Telephone # NA - 7 digit (555-1212)
-
Telephone # North American (888) 555-1212
-
Telephone# United Kingdom
-
URL
Note: To remove a pattern from the active pattern list, place a # at the beginning of the line.
Using a regular expression list file to mark text
If you are already comfortable with regular expressions, then simply refer to Creating list files to learn how to create a regular expression list file. Otherwise, review Appendix A: Regular Expressions.
To mark the text in a PDF document that matches a list of one or more regular expressions, enter the following command:
$redaxserver -o <output> -fregex <regex_listfile.txt> [other options] <input.pdf>
Redax Enterprise Server searches through the document. Each time it finds a match for the regular expressions defined in the sample_regex_list.txt file, it draws a Redax box around the text and overlays the box with the corresponding exemption code from the list file.
Example: Mark text in sample_base.pdf that matches the words and phrases in sample_regex_list.txt (both files are in the samples directory), and apply the exemption codes specified in sample_regex_list.txt. Perform a case-insensitive search to find all matching text, regardless of capitalization.
In Windows:
>redaxserver -o samples\mark_listed.pdf -fregex samples\sample__regex_list.txt -ignorecase samples\sample_base.pdf
In UNIX:
$redaxserver -o ./samples/mark_listed.pdf -fregex ./samples/sample__regex_list.txt -ignorecase ./samples/sample_base.pdf
A segment of the output for this example is displayed in the figure below.
![]()
Creating category-based markup
If you redact different information in a document depending on how it is to be used, you can create a markup category for each intended use. Then, when you perform the redaction, you can specify which category or categories to redact.
Because the category is specified in the preferences file, you must run Redax Enterprise Server once for each category you want to apply. You can use a different list file or convert a different type of Acrobat markup for each category. If you use list files, the listed words and phrases in each must be mutually exclusive to ensure the integrity of the categories.
To convert all Acrobat-underlined text to Redax boxes with no exemption codes and assign a category defined in a preferences file, enter the following command:
$redaxserver -o <output> -cu -pref <preferences.xml> [other options] <input.pdf>
Example: Convert Acrobat-underlined text in the sample_marked.pdf file, located in the samples directory, and save the output to mark_categories1.pdf. Use the preferences file public.xml, which defines a category of Public. (The marked_categories.pdf example shows the results of this process).
In Windows:
>redaxserver -o samples\mark_categories1.pdf -cu -pref samples\prefs\public.xml samples\sample_marked.pdf
In UNIX:
$redaxserver -o ./samples/mark_categories1.pdf -cu -pref ./samples/prefs/public.xml ./samples/sample_marked.pdf
To convert all Acrobat-highlighted and crossed-out text to Redax boxes with no exemption codes and assign a category defined in a preferences file, enter the following command:
$redaxserver -o <output> -ch -cs -pref <preferences.xml> [other options] <input.pdf>
Example: Convert Acrobat-highlighted and crossed-out text in the mark_categories1.pdf file, created in the previous example, and save the output to mark_categories2.pdf. Use the preferences file government.xml, which defines a category of Government.
In Windows:
>redaxserver -o samples\mark_categories2.pdf -ch -cs -pref samples\prefs\government.xml samples\mark_categories1.pdf
In UNIX:
$redaxserver -o ./samples/mark_categories2.pdf -ch -cs -pref ./samples/prefs/government.xml ./samples/mark_categories1.pdf
Marking images
If you want to mark all of the bitmap images in a document, use the -fimage option, as described in Finding all bitmap images. If you want to mark all of the vector images, use the -fpath option, as described in Finding all paths in vector images. If you only want to mark some of the images, you can use Redax to draw Redax boxes around just those images.
Command-line options
This section describes the command-line options for marking text for redaction. Subsequent sections of this chapter explain how to use the options to accomplish specific tasks.
The examples provided use the sample files contained in the samples subdirectory where Redax Enterprise Server was installed. In Windows, the default installation directory is C:\Appligent\RedaxServer\. In UNIX, it is wherever you installed it.
Command syntax
$redaxserver -o <output> [options] input1.pdf [input2.pdf ...]
Options for marking text — summary
| Type | Option | Parameter | Description |
|---|---|---|---|
| Preferences | -pref | <preferences.xml> | Read preferences from an XML file |
| Find and Mark | -fbracket | |
Find bracketed text |
| -markpages | <pages> | Mark single page or list of pages for redaction | |
| -flist | <listfile.txt> | Find using list file | |
| -fpattern | <pattern_listfile.txt> | Find using list file of pattern names | |
| -fregex | <regular_expression_listfile.txt> | Find using list file of regular expressions | |
| -exemptpat | Use the matching pattern name as the exemption code | ||
| -ignorecase | Ignore case during -flist or -fregex operations | ||
| Convert Acrobat- Selected Text |
-cm | Convert all Acrobat-selected text without exemption codes | |
| -ch | Convert Acrobat highlights without an exemption code | ||
| -chc | <exemption> | Convert Acrobat highlights using specified exemption code | |
| -cs | Convert Acrobat crossouts without an exemption code | ||
| -csc | <exemption> | Convert Acrobat crossouts using specified exemption code | |
| -cu | Convert Acrobat underlines with an exemption code | ||
| -cuc | <exemption> | Convert Acrobat underlines using specified exemption code | |
| -crem | Remove Acrobat annotations when using any convert option |
Note: A related option, -rmarkup, enables you to redact Acrobat markups at conversion time.
Options for marking 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.
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.
| 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. | Red | |
| Note: This option applies to Redax boxes only; it does not apply to Full-Page tags. | |||
| Markup Processing | Remove brackets when finding bracketed text | Indicates whether or not to mark the brackets for removal, along with the enclosed text, during a find bracketed text operation (-fbracket). | Do not mark brackets for removal |
-fbracket — Find bracketed text
Finds all text areas between brackets [ ] and draws Redax boxes around them. The brackets themselves are not marked unless you also specify a preferences file that indicates to Remove Brackets when Finding Bracketed Text.
-markpages <pages> — Mark single page or list of pages
Places a Full-page tag on each page specified in <pages> to mark the entire page for redaction. Either specify a single page or a list of pages. In a list, use a comma to separate pages and a dash to indicate a range of pages, as in the following examples. If you include spaces, enclose the list in quotes.
-markpages 6,14,17-20
-markpages “6, 14, 17-20”
-flist <listfile.txt> — Find using list file
Searches the document for all words and phrases in the redaction list file <listfile.txt>, marks them with Redax boxes, and applies the exemption code specified in the list. See Creating list files for more information about redaction list files.
-fpattern <pattern_listfile.txt> — Find using pre-defined patterns
Searches the document for patterns defined in a text file and marks them with Redax boxes. See the list of available patterns. To set an exemption code for an -fpattern process, use a preferences XML file with your desired exemption code set as the default.
-fregex <regex_listfile.txt> — Find using list file of regular expressions
Searches the document for words or phrases matching regular expressions as defined in a list file <regular_expressions_listfile.txt>, marks them with Redax boxes and applies the exemption code specified in the list. See creating list files for more information.
-exemptpat — Use the matching pattern name as the exemption code
Any Redax box created via -fpattern will have an exemption code that is the label of the pattern. For example, if you are looking for "Email" when Redax Enterprise Server finds the information in a file, the word "email" will be applied as the exemption code for these areas.
-ignorecase — Ignore case during find-using-list and find-using-a-regular-expression
Performs a case-insensitive search during the -flist and -fregex operations. By default, -flist and -fregex perform a case-sensitive search.
-cm — Convert all Acrobat highlights, underlines, and crossouts
Converts all Acrobat-highlighted, -underlined, and -crossed-out text to Redax markup but does not apply any exemption codes.
Note: If you specify the -ch, -cs, or -cu option with the -cm option, the -cm option is ignored.
-ch — Convert Acrobat highlights
Converts all Acrobat-highlighted text to Redax markup but does not apply an exemption code.
-chc <exemption> — Convert Acrobat highlights using exemption code
Converts all Acrobat-highlighted text to Redax markup and applies the specified exemption code.
-cs — Convert Acrobat crossouts
Converts all Acrobat-crossed-out text to Redax markup but does not apply an exemption code.
Note: Crossout in Acrobat 6 is the same as strikeout in Acrobat 5.
-csc <exemption> — Convert Acrobat crossouts using exemption code
Converts all Acrobat-crossed-out text to Redax markup and applies the specified exemption code.
-cu — convert Acrobat underlines
Converts all Acrobat-underlined text to Redax markup but does not apply an exemption code.
-cuc <exemption> — Convert Acrobat underlines using exemption code
Converts all Acrobat-underlined text to Redax markup and applies the specified exemption code.
-crem — Remove Acrobat annotations when using any convert option
Removes all Acrobat highlights, crossouts, and underlines—and any notes associated with them—following conversion to Redax boxes.
Note: You should always remove Acrobat annotations before releasing a document, because they might contain sensitive information. You can do this now with the -crem option or the -rmarkup option, or during redaction with the -remall option.