Skip to content
ComPDF
Guides

Global Config

GlobalConfig controls application-level global behavior, including theme mode, file save strategy, BOTA panel, search highlighting, thumbnails, page editor, and more.

Configuration Fields Overview

FieldTypeDefaultDescription
themeModeString"system"Application theme mode
fileSaveExtraFontSubsetbooleantrueWhether to embed font subsets when saving
useSaveIncrementalbooleantrueWhether to use incremental save
signatureTypeString"manual"Default signature type
enableExitSaveTipsbooleantrueWhether to show save prompt when exiting
enableErrorTipsbooleantrueWhether to show error tips

Theme Mode

themeMode controls the overall application theme:

ValueDescription
lightLight mode
darkDark mode
systemFollow system (default)
json
{
  "global": {
    "themeMode": "system"
  }
}

themeMode controls the application UI framework theme (status bar, toolbar background, etc.), which is different from readerViewConfig.themes that controls the PDF page reading theme. See Theming & Styles for the differences.

Save Behavior

json
{
  "global": {
    "fileSaveExtraFontSubset": true,
    "useSaveIncremental": true,
    "enableExitSaveTips": true
  }
}
FieldDescription
fileSaveExtraFontSubsetEmbed font subsets when saving to ensure edited text displays correctly on other devices
useSaveIncrementalIncremental save only appends changed data to the end of the file; faster but file may gradually grow
enableExitSaveTipsShow a save prompt dialog when exiting the document if there are unsaved changes

Signature Type

json
{
  "global": {
    "signatureType": "manual"
  }
}
ValueDescription
manualHandwritten signature (default)
digitalDigital signature
electronicElectronic signature

Watermark Configuration

global.watermark configures the default values for the watermark dialog:

json
{
  "global": {
    "watermark": {
      "types": ["text", "image"],
      "saveAsNewFile": false,
      "text": "",
      "image": "tools_logo",
      "textSize": 80,
      "textColor": "#FF000000",
      "scale": 1.0,
      "rotation": -45,
      "opacity": 255,
      "isFront": false,
      "isTilePage": false
    }
  }
}
FieldDescription
typesAvailable watermark types: text, image
saveAsNewFileWhether to save as a new file
textDefault text content
imageDefault image resource name (from drawable)
textSizeText font size
textColorText color
scaleScale ratio
rotationRotation angle
opacityOpacity (0-255)
isFrontWhether on page foreground (true) or background (false)
isTilePageWhether to tile across the entire page

Thumbnail Configuration

json
{
  "global": {
    "thumbnail": {
      "title": "",
      "backgroundColor": "",
      "editMode": true
    }
  }
}
FieldDescription
titleThumbnail panel title
backgroundColorBackground color
editModeWhether to enable thumbnail edit mode (supports page drag-to-reorder, delete, etc.)

BOTA Panel Configuration

The BOTA (Book Of Annotations) panel contains three tabs: outline, bookmarks, and annotation list.

json
{
  "global": {
    "bota": {
      "tabs": ["outline", "bookmark", "annotations"],
      "menus": {
        "annotations": {
          "global": [
            { "id": "importAnnotation" },
            { "id": "exportAnnotation" },
            { "id": "removeAllAnnotation" },
            { "id": "removeAllReply" }
          ],
          "item": [
            {
              "id": "reviewStatus",
              "subMenus": ["accepted", "rejected", "cancelled", "completed", "none"]
            },
            { "id": "markedStatus" },
            {
              "id": "more",
              "subMenus": ["addReply", "viewReply", "delete"]
            }
          ]
        }
      }
    }
  }
}

BOTA Tabs

ValueDescription
outlineDocument outline (table of contents)
bookmarkBookmarks
annotationsAnnotation list

Annotation List Menus

Global menus (global): Operations that apply to the entire annotation list.

idDescription
importAnnotationImport annotations
exportAnnotationExport annotations
removeAllAnnotationRemove all annotations
removeAllReplyRemove all replies

Item menus (item): Operations for individual annotation entries.

idDescription
reviewStatusReview status (sub-menus: accepted/rejected/cancelled/completed/none)
markedStatusMarked status
moreMore actions (sub-menus: addReply/viewReply/delete)

Search Highlight Configuration

json
{
  "global": {
    "search": {
      "normalKeyword": {
        "borderColor": "#00000000",
        "fillColor": "#77FFFF00"
      },
      "focusKeyword": {
        "borderColor": "#00000000",
        "fillColor": "#CCFD7338"
      }
    }
  }
}
FieldDescription
normalKeywordHighlight style for normal search results (border color + fill color)
focusKeywordHighlight style for the currently focused search result

Page Editor Configuration

json
{
  "global": {
    "pageEditor": {
      "menus": [
        "insertPage",
        "replacePage",
        "extractPage",
        "copyPage",
        "rotatePage",
        "deletePage"
      ]
    }
  }
}
Menu ItemDescription
insertPageInsert page
replacePageReplace page
extractPageExtract page
copyPageCopy page
rotatePageRotate page
deletePageDelete page