12-33 -searchTextAndHighlight: Inserting Highlight Annotations into the Searched Text

Processing

Searches for specified texts and inserts highlight annotations at the matched locations.

Example of commands

[Executing example commands]

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

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

[Windows]

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

[Linux]

AHPDFToolCmd80 -searchTextAndHighlight -sort -pageNo 2 -keyword "TEST" "abcd" -caseSensitive -color 0.5 0.0 0.7 -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.

-color <r> <g> <b>

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

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