[]
DsPdfJS API / ButtonAppearanceProperties
ButtonAppearanceProperties =
object
Defines properties of a ButtonAppearance object.
optionalcaption:string
The button's caption.
optionalcaptionImageRelation:CaptionImageRelation
Indicating how to position the button's caption relative to image.
optionaldownCaption:string
The button's caption used when the mouse button is pressed within its active area.
optionalimage:PdfImageHandler
The button's image.
You can use PdfImageHandler to assign an image to this property, for example:
const img = await Image.load(IMAGE_BYTES);
btn.buttonAppearance.image = doc.imageHandlers.GetImageHandler(img);
optionalimageScale:ImageScaleProperties|"scale"|"stretch"
The image scaling, it can be specified as an ImageScaleProperties object or one of predefined values: "scale", "stretch".
optionalrolloverCaption:string
The button's caption used when the user rolls the cursor into its active area without pressing the mouse button.