| FoxitPDFSDKforWeb v11.0.4 Archives Foxit PDF SDK for Web

Public Member Functions | List of all members
CreateFreeTextCalloutService Class Reference
PDFViewCtrl » creation

This is a class that encapsulates the function of creating callout annotations. It is usually used to customize the state handler for creating callout annotations. It can easily implement the process of creating callouts without having to care about more details. More...

Inheritance diagram for CreateFreeTextCalloutService:

## Public Member Functions
Promise< Annot[]> | complete ()
| This method is called at the end of the creation operation, at this time a real callout annotation will be created. More...
| prepare (pageRender:PDFPageRender)
| This method accepts a pageRender parameter and performs initialization. It should only be executed once. More...
| start (point:DevicePoint)
| This method is called at the beginning of creation, it will record a starting point. More...
void | update (point:DevicePoint, options?:Record< string, any >)
| Update the current coordinate point, usually called when the mouse is dragged. More...
Public Member Functions inherited from Disposable
| addDestroyHook (...hooks)
| Add a function to destroyHooks list, which will be called during destroy. More...
| destroy ()
| ownsTo (owner)
| Establishes an ownership relationship where this instance will be destroyed when the owner is destroyed. Additionally, the owner will be automatically removed from the destroyHooks list when this instance is destroyed. More...

## Detailed Description

This is a class that encapsulates the function of creating callout annotations. It is usually used to customize the state handler for creating callout annotations. It can easily implement the process of creating callouts without having to care about more details.

Since
  8.1.0

## Member Function Documentation

## ◆ complete()

Promise<Annot[]> complete | ( |  | ) |

This method is called at the end of the creation operation, at this time a real callout annotation will be created.

Since
  8.1.0

Returns
  Promise<Annot[]> -

See also
  PDFPage.addAnnot

## ◆ prepare()

CreateFreeTextCalloutService::prepare | ( | pageRender:PDFPageRender |  | ) |
| inline

This method accepts a pageRender parameter and performs initialization. It should only be executed once.

Parameters

  pageRender | PDFPageRender -

Since
  8.1.0

Returns
  void

Implements CreateAnnotationService.

## ◆ start()

CreateFreeTextCalloutService::start | ( | point:DevicePoint |  | ) |

This method is called at the beginning of creation, it will record a starting point.

Parameters

  point | DevicePoint - The start point

Since
  8.1.0

## ◆ update()

void CreateFreeTextCalloutService::update | ( | point:DevicePoint | ,
|  | options?:Record< string, any > |
| ) |  |

Update the current coordinate point, usually called when the mouse is dragged.

Parameters

  point | DevicePoint - Current mouse position relative to left-top corner of the PDFPage.
  [options] | Record<string, any> - more options to create callout

See also
  PDFPage.addAnnot

Since
  8.1.0

@2025 Foxit Software Incorporated. All rights reserved.