Type Definitions
Type Definitions
The additional options that are passed to PSPDFKit.AnnotationToolbarItemsCallback
.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
defaultAnnotationToolbarItems |
Array.<PSPDFKit.AnnotationToolbarItem> | The list of default items that are shown for this particular annotation. |
hasDesktopLayout |
boolean | Whether the screen is in desktop layout. |
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
color |
PSPDFKit.Color | null | The Color represented by this preset. Eg: |
localization |
Localization |
On Standalone, this callback receives the name of a font to retrieve as an argument
and you can return from it a Promise
that resolves to a Blob
with the font data to
use.
See this guide to learn more.
Parameters:
Name | Type | Description |
---|---|---|
fontName |
string | The |
Example
Create a custom font for retrieving "Arial.ttf"
new PSPDFKit.Font({
name: "Arial.ttf",
callback: name => fetch(`https://example.com/${name}`).then(r => r.blob());
})
Type:
- "none" | "square" | "circle" | "diamond" | "openArrow" | "closedArrow" | "butt" | "reverseOpenArrow" | "reverseClosedArrow" | "slash"
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string | Eg: 'purple' |
|
defaultMessage |
string |
<nullable> |
Default Localization message. Eg: 'Purple' |
description |
string |
<nullable> |
Description of the localization message. Eg: 'Purple Color' |
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
format |
string | The format of the text. Either |
value |
string | The text value. |