FoxitPDFSDKforWeb  v10.0.0
Foxit PDF SDK for Web
StampService Interface Reference

A singleton class, which can be obtained via PDFUI.getStampService. It can be used to obtain the currently selected stamp icon and monitor the switching action between stamp icons. More...

Public Member Functions

StampInfo getCurrentStampInfo ()
 Obtains the current stamp info object if the current state handler is STATE_HANDLER_CREATE_STAMP . More...
 
Function onSelectStampInfo (callback:(stampInfo:StampInfo|undefined)=>void)
 Listen to the stamp icon switching event, which is triggered when the stamp icon is switched using the StateHandlerManager.switchTo interface. The event will also be triggered when the state handler is switched from STATE_HANDLER_CREATE_STAMP to other state-handlers, At this time, the stampInfo obtained by the callback parameter will be undefined,. More...
 

Detailed Description

A singleton class, which can be obtained via PDFUI.getStampService. It can be used to obtain the currently selected stamp icon and monitor the switching action between stamp icons.

See also
PDFUI.getStampService
Since
9.0.0
Examples:

Using in UIExtension

var pdfui = new UIExtension.PDFUI({ PDFUI constructor options... });
var stampService = pdfui.getStampService();

Member Function Documentation

◆ getCurrentStampInfo()

StampInfo StampService::getCurrentStampInfo ( )

Obtains the current stamp info object if the current state handler is STATE_HANDLER_CREATE_STAMP .

Returns
StampInfo|undefined - The currently selected stamp info object. If no stamp is selected, returns undefined.
Since
9.0.0

◆ onSelectStampInfo()

Function StampService::onSelectStampInfo ( callback:(stampInfo:StampInfo|undefined)  ,
void   
)

Listen to the stamp icon switching event, which is triggered when the stamp icon is switched using the StateHandlerManager.switchTo interface. The event will also be triggered when the state handler is switched from STATE_HANDLER_CREATE_STAMP to other state-handlers, At this time, the stampInfo obtained by the callback parameter will be undefined,.

Parameters
callback(stampInfo: StampInfo | undefined) => void - The event listener function.
Returns
()=>void - A function for removing event listener.
Since
9.0.0

Foxit Software Corporation Logo
@2024 Foxit Software Incorporated. All rights reserved.