| FoxitPDFSDKforWeb v11.0.5 Archives Foxit PDF SDK for Web

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SnapshotInteraction Class Reference
UIExtension

This is a built-in snapshot interaction class, and the application layer can inherit it to implement custom interaction logic. More...

## Public Member Functions
Promise< void > | onCancel (prepareData:string|Blob)
| Called after the cancel button is clicked. More...
Promise< void > | onDownload (prepareData:string|Blob)
| Called after the download button is clicked. More...
Promise< void > | onOk (prepareData:string|Blob)
| Called after the ok button is clicked. More...
Promise< string|Blob > | prepare ()
| Called before the snapshot tool buttons are displayed, it can be used to process the snapshot image data, and return new data after the processing is completed. The returned data can be obtained through parameters in the onOk, onCancel and onDownload methods. More...

## Protected Member Functions
Promise< void > | copyToClipboard (data?:string|Blob)
| Copy image data url or blob data to clipboard. More...

## Protected Attributes
readonly PDFViewer | pdfViewer
| PDFViewer object instance for further operations. More...
readonly Snapshot | snapshot
| Currently selected snapshot information. More...

## Detailed Description

This is a built-in snapshot interaction class, and the application layer can inherit it to implement custom interaction logic.

Since
  9.0.0

## Member Function Documentation

## ◆ copyToClipboard()

Promise<void> SnapshotInteraction::copyToClipboard | ( | data?:string| | Blob | ) |
| protected

Copy image data url or blob data to clipboard.

See also
  PDFViewer.copySnapshot

Returns
  Promise<void> -

Since
  9.0.0

## ◆ onCancel()

Promise<void> SnapshotInteraction::onCancel | ( | prepareData:string| | Blob | ) |

Called after the cancel button is clicked.

Parameters

  prepareData | string|Blob - Data returned from the prepare method.

Since
  9.0.0

## ◆ onDownload()

Promise<void> SnapshotInteraction::onDownload | ( | prepareData:string| | Blob | ) |

Called after the download button is clicked.

Parameters

  prepareData | string|Blob - Data returned from the prepare method.

Since
  9.0.0

## ◆ onOk()

Promise<void> SnapshotInteraction::onOk | ( | prepareData:string| | Blob | ) |

Called after the ok button is clicked.

Parameters

  prepareData | string|Blob - Data returned from the prepare method.

Since
  9.0.0

## ◆ prepare()

Promise<string|Blob> SnapshotInteraction::prepare | ( |  | ) |

Called before the snapshot tool buttons are displayed, it can be used to process the snapshot image data, and return new data after the processing is completed. The returned data can be obtained through parameters in the onOk, onCancel and onDownload methods.

Since
  9.0.0

## Member Data Documentation

## ◆ pdfViewer

readonly PDFViewer SnapshotInteraction::pdfViewer
| protected

PDFViewer object instance for further operations.

Since
  9.0.0

## ◆ snapshot

readonly Snapshot SnapshotInteraction::snapshot
| protected

Currently selected snapshot information.

Since
  9.0.0

@2025 Foxit Software Incorporated. All rights reserved.