Skip to main content

Search

All commands related to the search feature.

find ⇒ JSON​

Find a word or multiple word.

ParamTypeDescription
querystringSearch query
caseSensitiveboolToggle case sensitive
entireWordboolToogle entire word highlighting
highlightAllboolToggle highlight all words occurences from the search phrase in the document
previousboolFind the previous word

Example​

TFTPDFGadget.callCommand({
name: 'find',
args: {
query: 'Enter a query here',
caseSensitive: false,
entireWord: true,
highlightAll: false,
previous: false,
},
callback: myfunc,
});

findNext​

Find the next occurrence.

Example​

TFTPDFGadget.callCommand({ name: 'findNext', callback: myfunc });

findPrevious​

Find the previous occurrence.

Example​

TFTPDFGadget.callCommand({ name: 'findPrevious', callback: myfunc });

changeFindOption ⇒ JSON​

Add or remove an option to the current search result.

ParamTypeDescription
namestringcaseSensitive - entireWord - highlightAll
valueboolEnable/Disable the search mode

Available find's name options:

  • caseSensitive: Enable/Disable the case sensitive mode.
  • entireWord: Enable/Disable the entire word mode.
  • highlightAll: : Highlight all the occurence or 1 per 1 occurence.

Example​

TFTPDFGadget.callCommand({
name: 'changeFindOption',
args: { name: 'caseSensitive', value: false },
callback: myfunc,
});