Document Solutions for PDF
Document Solutions PDF Viewer Overview / Edit PDF / Editors / Sticky Buttons
In This Topic
    Sticky Buttons
    In This Topic

    DsPdfViewer lets you add the stickyBehavior setting to the toolbarLayout property to set sticky behavior on button keys of the annotation or form editor, so that you can select the annotation or form field from the toolbar and draw it on PDF multiple times, without going back to the toolbar and selecting again.

    The following table provides a list of supported annotation and form fields:

    Supported Annotation Editor Keys
    edit-sign-tool edit-text edit-free-text edit-ink
    edit-square edit-circle edit-line edit-polyline
    edit-polygon edit-stamp edit-file-attachment edit-sound
    edit-link edit-redact
    Supported Form Editor Keys
    edit-widget-tx-field edit-widget-tx-password edit-widget-tx-text-area edit-widget-btn-checkbox
    edit-widget-btn-radio edit-widget-btn-push edit-widget-ch-combo edit-widget-ch-list-box
    edit-widget-tx-comb edit-widget-btn-submit edit-widget-btn-reset

    The code snippet below shows how to set sticky buttons in the DsPdfViewer.

    index.cshtml
    Copy Code
    // Set the sticky behavior for drawing annotations and form widgets:
    viewer.toolbarLayout.stickyBehavior = ['edit-ink', 'edit-square', 'edit-circle', 'edit-line', 'edit-polyline', 'edit-polygon', "edit-redact",
    "edit-widget-tx-field", "edit-widget-tx-text-area", "edit-widget-btn-push", "edit-widget-btn-checkbox", "edit-widget-btn-radio"];
    viewer.applyToolbarLayout();