Properties plugin

The properties plugin provides a button to list the properties of the PDF document.

Install

npm install '@react-pdf-viewer/properties';

Usage

  • Import the plugin and styles:
import { propertiesPlugin } from '@react-pdf-viewer/properties';

// Import styles
import '@react-pdf-viewer/properties/lib/styles/index.css';
  • Create the plugin instance:
const propertiesPluginInstance = propertiesPlugin();

The plugin instance propertiesPluginInstance provides the following properties:

PropertyTypeDescriptionFrom
ShowPropertiesReactElementCustomizable button to list the properties2.0.0
ShowPropertiesButtonReactElementThe default button to list the properties2.0.0
ShowPropertiesMenuItemReactElementThe default menu item to list the properties2.0.0
  • Finally, register the properties plugin instance:
<Viewer
    fileUrl='...'
    plugins={[
        propertiesPluginInstance,
    ]}
/>

Examples