12-34 -searchTextAndRedact: Inserting Redact Annotations into the Searched Text

Processing

This searches for a specified string and adds a Redact annotation at the matched locations.

Example of commands
コマンド例

[Executing example commands]
[コマンド例の実行内容]

Search for the keywords "TEST" and "abcd" in "test.pdf" and add Redact annotations to the matched locations.

  • When searching, the original data are sorted by coordinate order before searching.
  • The search is case-sensitive.
  • Redact annotation settings are as follows:
    • Annotation color: {R G B}={0.5, 0.0, 0.7}
    • Outline color: {R G B}={0.0, 0.0, 0.1}
    • Mask color: {R G B}={1.0, 0.0, 0.0}
    • Opacity: 0.5

[Windows]

AHPDFToolCmd80.exe -searchText -sort -pageNo 2 -keyword "TEST" "abcd" -caseSensitive -color 0.5 0.0 0.7 -outlineColor 0.0 0.0 0.1 -maskColor 1.0 0.0 0.0 -opacity 0.5 -d C:\test\test.pdf -o C:\sav\out.pdf

[Linux]

AHPDFToolCmd80 -searchText -sort -pageNo 2 -keyword "TEST" "abcd" -caseSensitive -color 0.5 0.0 0.7 -outlineColor 0.0 0.0 0.1 -maskColor 1.0 0.0 0.0 -opacity 0.5 -d /home/antenna/test/test.pdf -o /home/antenna/sav/out.pdf

Folder settings: not applied

Parameters

Parameter

Content

-pageNo <Val>

Can be omitted.
Sets the page number to search text.
If not specified, search text from all pages.

Page number is 0 origin. Therefore, the first page is counted from "0."
If specifying multiple page numbers, separate them with commas. (Example)

-keyword <Val>

The text to search for.
Can be specified at the same time as -keywordRegEx.
Keywords are enclosed in double quotation marks ("").

Up to three elements can be specified to search for. Specifying four or more will result in an error.

An error will occur if neither "-keyword" nor "-keywordRegEx" is specified.

-keywordRegEx <Val>

Regular expression search keyword.
Can be specified at the same time as -keyword.
Keywords are enclosed in double quotation marks ("").

Up to three elements can be specified to search for. Specifying four or more will result in an error.

An error will occur if neither "-keyword" nor "-keywordRegEx" is specified.

-sort

Can be omitted.
If specified, the source data will be sorted in coordinate order before the search.
If not specified, the string will be searched in the order of the internal data.

For English text specifically, specifying this parameter enables space detection based on the gaps between characters, allowing for searches that recognize words and spaces.

-caseSensitive

Can be omitted.
If specified, the search will be case-sensitive for the alphabetic characters in the search string.
If not specified, the search will not be case-sensitive.

-color <r> <g> <b>

Can be omitted.
Redact Annotation body fill color. If not specified, it will be black (0.0 0.0 0.0).

Setting value range: <r>, <g>, <b> each 0.0 to 1.0

-outlineColor <r> <g> <b>

Can be omitted.
Redact annotation outline color. If not specified, it will be black (0.0 0.0 0.0).

Setting value range: <r>, <g>, <b> each 0.0 to 1.0

-maskColor <r> <g> <b>

Can be omitted.
Mask color after applying Redact annotation. If not specified, it will be black (0.0 0.0 0.0).

Setting value range: <r>, <g>, <b> each 0.0 to 1.0

-opacity <Val>

Can be omitted.
Annotation opacity. If not specified, it will be 1.0 (opaque).
When specified, it must be specified in conjunction with "-color".

Setting value <Val> range: 0.0 to 1.0.
0.0 is transparent, 1.0 is opaque.

Please enter alt text.