yarn @react-pdf-viewer/core 3.11.0
Thumbnails direction

latest release: 3.12.0
15 months ago

New features

  • Add pagesContainerRef to RenderViewer, so the plugin can access the pages container more easily
  • Viewer adds new property to customize the view of a protected document:
import { RenderProtectedViewProps, Viewer } from '@react-pdf-viewer/core';

const ProtectedView: React.FC<RenderProtectedViewProps> = ({ passwordStatus, verifyPassword }) => {
    ...
};

<Viewer renderProtectedView={ProtectedView} />
  • The page navigation plugin exposes functions to jump to the previous and next pages
import { pageNavigationPlugin } from '@react-pdf-viewer/page-navigation';

const pageNavigationPluginInstance = pageNavigationPlugin();
const { jumpToNextPage, jumpToPreviousPage } = pageNavigationPluginInstance;
  • The Thumbnails component provides new property to display the thumbnails in the given direction:
import { ThumbnailDirection } from '@react-pdf-viewer/thumbnail';

// Display thumbnails horizontally
<Thumbnails thumbnailDirection={ThumbnailDirection.Horizontal} />

// Display thumbnails vertically
<Thumbnails thumbnailDirection={ThumbnailDirection.Vertical} />

Improvements

  • Change the shortcuts to behave identically as other applications (such as Adobe Acrobat):
Shortcut Operating System Action
Command + ArrowLeft macOS Jump to previous clicked link annotation
Alt + ArrowLeft Windows Same as above
  • Support pdf-js 3.2.146
  • The thumbnails are updated to look identically to the pages when users change the viewmode

Bug fixes

  • The dual page viewmode doesn't work well with the initial page (initialPage) option
  • Page navigation doesn't move to the final page properly

Breaking change

  • The PageLayout's tranformSize property is changed to transformSize

Don't miss a new core release

NewReleases is sending notifications on new releases.