GithubHelp home page GithubHelp logo

React PDF viewer

A React component to view a PDF document. It's written in TypeScript, and powered by React hooks completely.

React PDF viewer

// Core viewer
import { Viewer } from '@react-pdf-viewer/core';

// Plugins
import { defaultLayoutPlugin } from '@react-pdf-viewer/default-layout';

// Import styles
import '@react-pdf-viewer/core/lib/styles/index.css';
import '@react-pdf-viewer/default-layout/lib/styles/index.css';

// Create new plugin instance
const defaultLayoutPluginInstance = defaultLayoutPlugin();

<Viewer
    fileUrl='/assets/pdf-open-parameters.pdf'
    plugins={[
        // Register plugins
        defaultLayoutPluginInstance,
        ...
    ]}
/>

Features

Basic features

  • Support password protected document
  • Zooming: Support custom levels such as actual size, page fit, and page width
  • Navigation between pages
  • Can go to the first and last pages quickly
  • Search for text
  • Preview page thumbnails
  • View and navigate the table of contents
  • List and download attachments
  • Rotating
  • Text selection and hand tool modes
  • Different scrolling modes
  • Full screen mode
  • Can open a file from local. Users can drag and drop a local file to view it
  • Download file
  • View the document properties
  • Support SSR
  • Print
  • Theming
  • Dark mode
  • Accessibility

Customization

  • The toolbar can be customized easily
  • All text items can be localized in another language

License

You have to purchase a Commercial License at the official website.

About

This project is developed by Nguyen Huu Phuoc. I love building products and sharing knowledge.

React PDF Viewer's Projects

locales icon locales

Translations of the React PDF Viewer's UI in different languages

starter icon starter

Some boilerplates to use React PDF viewer component

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.