[]
        
(Showing Draft Content)

ButtonAppearanceProperties

DsPdfJS API v9.1.0


DsPdfJS API / ButtonAppearanceProperties

Type Alias: ButtonAppearanceProperties

ButtonAppearanceProperties = object

Defines properties of a ButtonAppearance object.

Properties

caption?

optional caption: string

The button's caption.


captionImageRelation?

optional captionImageRelation: CaptionImageRelation

Indicating how to position the button's caption relative to image.


downCaption?

optional downCaption: string

The button's caption used when the mouse button is pressed within its active area.


image?

optional image: PdfImageHandler

The button's image.

You can use PdfImageHandler to assign an image to this property, for example:

Example

const img = await Image.load(IMAGE_BYTES);
btn.buttonAppearance.image = doc.imageHandlers.GetImageHandler(img);

imageScale?

optional imageScale: ImageScaleProperties | "scale" | "stretch"

The image scaling, it can be specified as an ImageScaleProperties object or one of predefined values: "scale", "stretch".


rolloverCaption?

optional rolloverCaption: string

The button's caption used when the user rolls the cursor into its active area without pressing the mouse button.