React PDF viewer v3.7.0 Release Notes
-
๐ New feature
- You can customize the bookmarks by using the
renderBookmarkItem
properly:
<Bookmark renderBookmarkItem={renderBookmarkItem} />
- 0๏ธโฃ The default layout plugin provides new
toggleTab
function to toggle a given tab in the sidebar:
const defaultLayoutPluginInstance = defaultLayoutPlugin(); const { toggleTab } = defaultLayoutPluginInstance; // Toggle the second tab toggleTab(1);
๐ Improvement
- ๐ Clicking
Command
+ArrowUp
(on macOS) orCtrl
+ArrowUp
(on Windows) will bring users to the previous clicked link annotation. You can disable that shortcuts via theenableShortcuts
option:
// Use the standalone page navigation plugin const pageNavigationPluginInstance = pageNavigationPlugin({ enableShortcuts: false, }); // Use the default layout plugin const defaultLayoutPluginInstance = defaultLayoutPlugin({ toolbarPlugin: { pageNavigationPlugin: { enableShortcuts: false, }, }, });
๐ Bug fixes
- Clicking a particular bookmark might not go to the destination
- Link annotations with unsafe URLs won't be rendered to avoid secutiry issues
- The
CharacterMap
type isn't available - The
onPageChange
callback does not trigger if the current page equals to the initial page - ๐ The page navigation options are missing when creating a toolbar plugin
- The search popover always shows up after pressing shortcuts
- The viewer always navigates to previous, next pages after users press shortcuts even the document isn't focused
- You can customize the bookmarks by using the