| FoxitPDFSDKforWeb v11.0.6 Archives Foxit PDF SDK for Web

Public Member Functions | List of all members
ActionCallbackManager Class Reference
PDFViewCtrl

Action callback manager class, It used to control customized action callbacks. It can be obtained via PDFViewer::getActionCallbackManager() method. More...

## Public Member Functions
| setEmbeddedGotoCallback (callback)
| Set the EmbeddedGoto action callback. More...

## Detailed Description

Action callback manager class, It used to control customized action callbacks. It can be obtained via PDFViewer::getActionCallbackManager() method.

Deprecated:
  Starting from 11.0.0, this method is deprecated and replaced by PDFViewer constructor options.customs.actionExecutor callback.

Since
  9.1.0

## Member Function Documentation

## ◆ setEmbeddedGotoCallback()

ActionCallbackManager::setEmbeddedGotoCallback | ( |  | callback | ) |
| inline

Set the EmbeddedGoto action callback.

Parameters

  callback | (options:ExecuteActionOptions)=>Promise<void> - The callback when the action is activated.

Returns
  void -

Since
  9.1.0

Example:
  function example (pdfViewer) {
  const actionCallbackMgr = pdfViewer.getActionCallbackManager();
  actionCallbackMgr.setEmbeddedGotoCallback(function(options) {
  const actionData = options.data.data;
  if(actionData.rootFile) {
  const { fileName, buffer } = actionData.rootFile;
  if (buffer) {
  pdfViewer.openPDFByFile(buffer, {
  fileName
  });
  }
  }
  //do something with action's information
  return Promise.resolve();
  })
  }

@2025 Foxit Software Incorporated. All rights reserved.