12-35 -searchTextAndSetMask: Masking the Searched Text

Processing

Search for specified texts, fill the matched locations with the mask color, and delete the character data at the corresponding location.

Example of commands

[Executing example commands]

Search for the keywords "TEST" and "abcd" in "test.pdf" and mask the matched locations.

  • When searching, the original data are sorted by coordinate order before searching.
  • The search is case-sensitive.
  • Mask settings are as follows:
    • 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 -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 -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) "0,2-4"

-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.

-maskColor <r> <g> <b>

Can be omitted.
Mask 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

-opacity <Val>

Can be omitted.
Mask 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.