ComPDFKit Web SDK
    Preparing search index...

    Function setCustomDrawHandler

    • Replaces the drawing of an annotation class. Annotations of the class are then drawn by the handler instead of their appearance, and by default the custom drawing is written as the appearance when saving.

      Parameters

      • cls: Ctor<Core.Annotations.Annotation>

        The annotation class.

      • handler: DrawHandler | null

        Draws the annotation; receives the context, the page matrix, the rotation and an object with the annotation and its original draw function. null restores the original drawing.

      • Optionaloptions: { canvasMultiplier?: number; generateAppearance?: boolean }

        Appearance options.

        • OptionalcanvasMultiplier?: number

          Resolution multiplier of the canvas the appearance is rendered on; the runtime canvas multiplier by default.

        • OptionalgenerateAppearance?: boolean

          Write the custom drawing as the appearance when saving; true by default.

      Returns void