Skip to content

UI Visibility

The ComPDFKit Flutter SDK provides several ways to show or hide the user interface (UI). The following table summarizes the supported options:

OptionDescription
automaticToolbars and other UI elements automatically show or hide when the page is tapped
alwaysUI is always visible
neverUI is always hidden

You can change the UI visibility mode using the uiVisibilityMode option. The example below shows how to use automatic mode:

dart
CPDFConfiguration(
  modeConfig: const CPDFModeConfig(
    uiVisibilityMode: CPDFUIVisibilityMode.automatic,
  ),
);

Automatic mode behavior:

AndroidiOS
Android Automatic UIiOS Automatic UI

Always mode behavior:

AndroidiOS
Android Always UIiOS Always UI

Never mode behavior:

AndroidiOS
Android Never UIiOS Never UI