FoxitPDFSDKforWeb v10.0.0
Foxit PDF SDK for Web
DigitalStampUIXAddon Class Reference

Represents the Digital Stamp Addon in the UIExtension, allowing users to manage digital stamps. More...

Inheritance diagram for DigitalStampUIXAddon:
UIXAddon

Public Member Functions

 getDigitalStampTemplate ()
 Gets the custom digital stamp templates. More...
 
 getIdentityInfo ()
 Gets the current identity information for digital stamps. More...
 
 removeDigitalStampTemplates (names)
 Removes custom digital stamp templates by their names. More...
 
 resetIdentityInfo ()
 Resets identity information for digital stamps. More...
 
 setDefaultSize (size)
 This method allows the user to define the default size for digital stamps. However, it should be noted that this default size is applicable only to the built-in digital stamps. More...
 
 setDigitalStampTemplates (templates)
 Sets custom digital stamp templates. It should be noted that this method will override the built-in digital stamps. More...
 
 setIdentityInfo (info)
 Sets identity information for digital stamps. More...
 
 setTimeFormatOfDigitalStamp (timeFormat)
 Sets the time format of digital stamps. More...
 
- Public Member Functions inherited from UIXAddon
 afterMounted (root)
 Lifecycle method: this method is called after the UI component element mout into DOM tree. More...
 
 beforeMounted (root)
 Lifecycle method: this hook is called before the UI component element mount into DOM tree. More...
 
 destroy ()
 Lifecycle method: to override this method to implement the destroying logics. This method is called when a PDFUI instance is destroyed or the addon is dettached from PDFUI. More...
 
 fragments ()
 UI fragment configurations of this addon. More...
 
 getI18NResources ()
 Get I18n resources. More details about I18Next, please visit: https://www.i18next.com/. More...
 
static getName ()
 Returns the name of an addon. More...
 
 init (pdfui)
 Called when initializing this addon instance. More...
 
 pdfViewerCreated (pdfviewer)
 Lifecycle method: this method is called when PDFViewer instance has been created and is before the afterMounted method . More...
 

Additional Inherited Members

- Protected Member Functions inherited from UIXAddon
 receiveAction (actionName, args=[])
 When the user calls PDFUI.callAddon, the receiveAction method on the corresponding Addon will be triggered. Addon exposes the API through this method and different action values. In the custom Addon subclass, you should implement this method to implement exposed APIs. More...
 
- Static Protected Member Functions inherited from UIXAddon
static initOnLoad ()
 Called after loading this addon, and only called once, The UI modules, components and controllers should be initialized and registered in this function.
 

Detailed Description

Represents the Digital Stamp Addon in the UIExtension, allowing users to manage digital stamps.

The Digital Stamp Addon provides functionality for managing and customizing digital stamps within PDF documents.

Since
9.2.0
Example of obtaining and using the Digital Stamp Addon instance:
pdfui.getAddonInstance('DigitalStampUIXAddon').then(digitalStampAddon => {
if (digitalStampAddon) {
// You can now use the digitalStampAddon to manage digital stamps and settings.
digitalStampAddon.setIdentityInfo(identityInfo);
} else {
console.error("Digital Stamp Addon instance not found.");
}
});

Member Function Documentation

◆ getDigitalStampTemplate()

DigitalStampUIXAddon::getDigitalStampTemplate ( )
inline

Gets the custom digital stamp templates.

Returns
DigitalStampTemplate[] - An array of custom digital stamp templates.
Since
9.2.0
Example of getting custom digital stamp templates:
pdfui.getAddonInstance('DigitalStampUIXAddon').then(digitalStampAddon => {
if (digitalStampAddon) {
const customTemplates = digitalStampAddon.getDigitalStampTemplate()
} else {
console.error("Digital Stamp Addon instance not found.");
}
});

◆ getIdentityInfo()

DigitalStampUIXAddon::getIdentityInfo ( )
inline

Gets the current identity information for digital stamps.

Returns
IdentityInfo - The identity information object.
Since
9.2.0
Example of getting current digital stamps identity information.
pdfui.getAddonInstance('DigitalStampUIXAddon').then(digitalStampAddon => {
if (digitalStampAddon) {
const identityInfo = digitalStampAddon.getIdentityInfo();
console.log(identityInfo)
} else {
console.error("Digital Stamp Addon instance not found.");
}
});

◆ removeDigitalStampTemplates()

DigitalStampUIXAddon::removeDigitalStampTemplates (   names)
inline

Removes custom digital stamp templates by their names.

Parameters
namesstring[] - An array of custom digital stamp template names to remove.
Returns
Promise<void> - A Promise that resolves when the templates are removed.
Since
9.2.0
Example of remove custom digital stamp templates:
pdfui.getAddonInstance('DigitalStampUIXAddon').then(digitalStampAddon => {
if (digitalStampAddon) {
const names = [...]; // An array of custom digital stamp template names
digitalStampAddon.removeDigitalStampTemplates(names);
} else {
console.error("Digital Stamp Addon instance not found.");
}
});

◆ resetIdentityInfo()

DigitalStampUIXAddon::resetIdentityInfo ( )
inline

Resets identity information for digital stamps.

Returns
Promise<void> - A Promise that resolves when the identity information is reset.
Since
9.2.0
Example of resetting identity information:
pdfui.getAddonInstance('DigitalStampUIXAddon').then(digitalStampAddon => {
if (digitalStampAddon) {
// You can now use the digitalStampAddon to manage digital stamps and settings.
digitalStampAddon.resetIdentityInfo().then(_ => {
console.log("Identity information reset successfully.");
});
} else {
console.error("Digital Stamp Addon instance not found.");
}
});

◆ setDefaultSize()

DigitalStampUIXAddon::setDefaultSize (   size)
inline

This method allows the user to define the default size for digital stamps. However, it should be noted that this default size is applicable only to the built-in digital stamps.

Parameters
sizeDigitalStampSize - The default size for digital stamps.
Since
9.2.0
Example of setting the default size for digital stamps:
pdfui.getAddonInstance('DigitalStampUIXAddon').then(digitalStampAddon => {
if (digitalStampAddon) {
digitalStampAddon.setDefaultSize({width:100,height:100});
} else {
console.error("Digital Stamp Addon instance not found.");
}
});

◆ setDigitalStampTemplates()

DigitalStampUIXAddon::setDigitalStampTemplates (   templates)
inline

Sets custom digital stamp templates. It should be noted that this method will override the built-in digital stamps.

Parameters
templatesDigitalStampTemplate[] - The custom digital stamp templates to set.
Returns
Promise<void> - A Promise that resolves when the custom templates are set.
Since
9.2.0
Example of setting custom digital stamp templates:
pdfui.getAddonInstance('DigitalStampUIXAddon').then(digitalStampAddon => {
if (digitalStampAddon) {
const customTemplates = [...]; // An array of custom templates
digitalStampAddon.setDigitalStampTemplates(customTemplates);
} else {
console.error("Digital Stamp Addon instance not found.");
}
});

◆ setIdentityInfo()

DigitalStampUIXAddon::setIdentityInfo (   info)
inline

Sets identity information for digital stamps.

Parameters
infoIdentityInfo - The identity information to set.
Returns
Promise<void> - A Promise that resolves when the identity information is set.
Since
9.2.0
pdfui.getAddonInstance('DigitalStampUIXAddon').then(digitalStampAddon => {
if (digitalStampAddon) {
digitalStampAddon.setIdentityInfo(identityInfo);
} else {
console.error("Digital Stamp Addon instance not found.");
}
});

◆ setTimeFormatOfDigitalStamp()

DigitalStampUIXAddon::setTimeFormatOfDigitalStamp (   timeFormat)
inline

Sets the time format of digital stamps.

Parameters
timeFormatstring - The time format, following the same parameter as Date.Format.
Returns
Promise<void> - A Promise that resolves when the time format is set.
Since
9.2.0
Example of setting the time format for digital stamps:
pdfui.getAddonInstance('DigitalStampUIXAddon').then(digitalStampAddon => {
if (digitalStampAddon) {
digitalStampAddon.setTimeFormatOfDigitalStamp('YYYY/MM');
} else {
console.error("Digital Stamp Addon instance not found.");
}
});

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