Properties plugin

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

Install

npm install '@react-pdf-viewer/properties';
The properties plugin is included in the toolbar and default-layout plugins

Usage

1. Import the plugin and styles
import { propertiesPlugin } from '@react-pdf-viewer/properties';
// Import styles
import '@react-pdf-viewer/properties/lib/styles/index.css';
2. 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
3. Register the plugin
Register the properties plugin instance:
<Viewer plugins={[propertiesPluginInstance]} />

See also

Changelog

v2.0.0
  • First release