Display PDFs in your React app as easily as if they were images.

Overview

npm downloads CI dependencies dev dependencies tested with jest

React-PDF

Display PDFs in your React app as easily as if they were images.

Lost?

This package is used to display existing PDFs. If you wish to create PDFs using React, you may be looking for @react-pdf/renderer.

tl;dr

  • Install by executing npm install react-pdf or yarn add react-pdf.
  • Import by adding import { Document } from 'react-pdf'.
  • Use by adding <Document file="..." />. file can be a URL, base64 content, Uint8Array, and more.
  • Put <Page /> components inside <Document /> to render pages.

Demo

A minimal demo page can be found in sample directory.

Online demo is also available!

Before you continue

React-PDF is under constant development. This documentation is written for React-PDF 5.x branch. If you want to see documentation for other versions of React-PDF, use dropdown on top of GitHub page to switch to an appropriate tag. Here are quick links to the newest docs from each branch:

Getting started

Compatibility

React

To use the latest version of React-PDF, your project needs to use React 16.3 or later.

If you use an older version of React, please refer to the table below to a find suitable React-PDF version. Don't worry - as long as you're running React 15.5 or later, you won't be missing out a lot!

React version Newest compatible React-PDF version
≥16.3 latest
≥15.5 4.x

Internet Explorer

Internet Explorer is not supported in React-PDF 5.x or later. If you need Internet Explorer support, you will need to use React-PDF 4.x instead. Don't worry - it still receives bug fixes and even occasional small features!

Installation

Add React-PDF to your project by executing npm install react-pdf or yarn add react-pdf.

Usage

Here's an example of basic usage:

import React, { useState } from 'react';
import { Document, Page } from 'react-pdf';

function MyApp() {
  const [numPages, setNumPages] = useState(null);
  const [pageNumber, setPageNumber] = useState(1);

  function onDocumentLoadSuccess({ numPages }) {
    setNumPages(numPages);
  }

  return (
    <div>
      <Document
        file="somefile.pdf"
        onLoadSuccess={onDocumentLoadSuccess}
      >
        <Page pageNumber={pageNumber} />
      </Document>
      <p>Page {pageNumber} of {numPages}</p>
    </div>
  );
}

Check the sample directory in this repository for a full working example. For more examples and more advanced use cases, check Recipes in React-PDF Wiki.

Enable PDF.js worker

It is crucial for performance to use PDF.js worker whenever possible. This ensures that PDF files will be rendered in a separate thread without affecting page performance. To make things a little easier, we've prepared several entry points you can use.

Webpack

Instead of directly importing/requiring 'react-pdf', import it like so:

// using ES6 modules
import { Document } from 'react-pdf/dist/esm/entry.webpack';

// using CommonJS modules
import { Document } from 'react-pdf/dist/umd/entry.webpack';

Parcel

Instead of directly importing/requiring 'react-pdf', import it like so:

// using ES6 modules
import { Document } from 'react-pdf/dist/esm/entry.parcel';

// using CommonJS modules
import { Document } from 'react-pdf/dist/umd/entry.parcel';

Create React App

Create React App uses Webpack under the hood, but instructions for Webpack will not work. Standard instructions apply.

Standard (Browserify and others)

If you use Browserify or other bundling tools, you will have to make sure on your own that pdf.worker.js file from pdfjs-dist/build is copied to your project's output folder.

Alternatively, you could use the minified pdf.worker.min.js from an external CDN:

import { pdfjs } from 'react-pdf';
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.min.js`;

Support for annotations

If you want to use annotations (e.g. links) in PDFs rendered by React-PDF, then you would need to include stylesheet necessary for annotations to be correctly displayed like so:

// using ES6 modules
import 'react-pdf/dist/esm/Page/AnnotationLayer.css';

// using CommonJS modules
import 'react-pdf/dist/umd/Page/AnnotationLayer.css';

Support for non-latin characters

If you want to ensure that PDFs with non-latin characters will render perfectly, or you have encountered the following warning:

Warning: The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.

then you would also need to include cMaps in your build and tell React-PDF where they are.

Copying cMaps

First, you need to copy cMaps from pdfjs-dist (React-PDF's dependency - it should be in your node_modules if you have React-PDF installed). cMaps are located in pdfjs-dist/cmaps.

Webpack

Add copy-webpack-plugin to your project if you haven't already:

npm install copy-webpack-plugin --save-dev

Now, in your Webpack config, import the plugin:

import CopyWebpackPlugin from 'copy-webpack-plugin';

and in plugins section of your config, add the following:

new CopyWebpackPlugin([
  {
    from: 'node_modules/pdfjs-dist/cmaps/',
    to: 'cmaps/'
  },
]),
Parcel, Browserify and others

If you use Parcel, Browserify or other bundling tools, you will have to make sure on your own that cMaps are copied to your project's output folder.

Setting up React-PDF

Now that you have cMaps in your build, pass required options to Document component by using options prop, like so:

<Document
  options={{
    cMapUrl: 'cmaps/',
    cMapPacked: true,
  }}
/>

Alternatively, you could use cMaps from external CDN:

import { pdfjs } from 'react-pdf';

<Document
  options={{
    cMapUrl: `//cdn.jsdelivr.net/npm/[email protected]${pdfjs.version}/cmaps/`,
    cMapPacked: true,
  }}
/>

User guide

Document

Loads a document passed using file prop.

Props

Prop name Description Default value Example values
className Class name(s) that will be added to rendered element along with the default react-pdf__Document. n/a
  • String:
    "custom-class-name-1 custom-class-name-2"
  • Array of strings:
    ["custom-class-name-1", "custom-class-name-2"]
error What the component should display in case of an error. "Failed to load PDF file."
  • String:
    "An error occurred!"
  • React element:
    <div>An error occurred!</div>
  • Function:
    this.renderError
externalLinkTarget Link target for external links rendered in annotations. unset, which means that default behavior will be used One of valid values for target attribute.
  • "_self"
  • "_blank"
  • "_parent"
  • "_top"
file What PDF should be displayed.
Its value can be an URL, a file (imported using import ... from ... or from file input form element), or an object with parameters (url - URL; data - data, preferably Uint8Array; range - PDFDataRangeTransport; httpHeaders - custom request headers, e.g. for authorization), withCredentials - a boolean to indicate whether or not to include cookies in the request (defaults to false).
Warning: Since equality check (===) is used to determine if file object has changed, it must be memoized by setting it in component's state, useMemo or other similar technique.
n/a
  • URL:
    "http://example.com/sample.pdf"
  • File:
    import sample from '../static/sample.pdf' and then
    sample
  • Parameter object:
    { url: 'http://example.com/sample.pdf', httpHeaders: { 'X-CustomHeader': '40359820958024350238508234' }, withCredentials: true }
imageResourcesPath The path used to prefix the src attributes of annotation SVGs. n/a (pdf.js will fallback to an empty string) "/public/images/"
inputRef A prop that behaves like ref, but it's passed to main <div> rendered by <Document> component. n/a
  • Function:
    (ref) => { this.myDocument = ref; }
  • Ref created using React.createRef:
    this.ref = React.createRef();

    inputRef={this.ref}
  • Ref created using React.useRef:
    const ref = React.useRef();

    inputRef={ref}
loading What the component should display while loading. "Loading PDF…"
  • String:
    "Please wait!"
  • React element:
    <div>Please wait!</div>
  • Function:
    this.renderLoader
noData What the component should display in case of no data. "No PDF file specified."
  • String:
    "Please select a file."
  • React element:
    <div>Please select a file.</div>
  • Function:
    this.renderNoData
onItemClick Function called when an outline item has been clicked. Usually, you would like to use this callback to move the user wherever they requested to. n/a ({ pageNumber }) => alert('Clicked an item from page ' + pageNumber + '!')
onLoadError Function called in case of an error while loading a document. n/a (error) => alert('Error while loading document! ' + error.message)
onLoadSuccess Function called when the document is successfully loaded. n/a (pdf) => alert('Loaded a file with ' + pdf.numPages + ' pages!')
onPassword Function called when a password-protected PDF is loaded. A function that prompts the user for password (callback) => callback('s3cr3t_p4ssw0rd')
onSourceError Function called in case of an error while retrieving document source from file prop. n/a (error) => alert('Error while retrieving document source! ' + error.message)
onSourceSuccess Function called when document source is successfully retrieved from file prop. n/a () => alert('Document source retrieved!')
options An object in which additional parameters to be passed to PDF.js can be defined. For a full list of possible parameters, check PDF.js documentation on DocumentInitParameters. n/a { cMapUrl: 'cmaps/', cMapPacked: true }
renderMode Rendering mode of the document. Can be "canvas", "svg" or "none". "canvas" "svg"
rotate Rotation of the document in degrees. If provided, will change rotation globally, even for the pages which were given rotate prop of their own. 90 = rotated to the right, 180 = upside down, 270 = rotated to the left. n/a 90

Page

Displays a page. Should be placed inside <Document />. Alternatively, it can have pdf prop passed, which can be obtained from <Document />'s onLoadSuccess callback function, however some advanced functions like linking between pages inside a document may not be working correctly.

Props

Prop name Description Default value Example values
canvasRef A prop that behaves like ref, but it's passed to <canvas> rendered by <PageCanvas> component. If you set renderMode to "svg" this prop will be ignored. n/a
  • Function:
    (ref) => { this.myPage = ref; }
  • Ref created using React.createRef:
    this.ref = React.createRef();

    inputRef={this.ref}
  • Ref created using React.useRef:
    const ref = React.useRef();

    inputRef={ref}
className Class name(s) that will be added to rendered element along with the default react-pdf__Page. n/a
  • String:
    "custom-class-name-1 custom-class-name-2"
  • Array of strings:
    ["custom-class-name-1", "custom-class-name-2"]
customTextRenderer A function that customizes how a text layer is rendered. Passes itext item and index for item. n/a ({ str, itemIndex }) => { return (<mark>{str}</mark>) }
error What the component should display in case of an error. "Failed to load the page."
  • String:
    "An error occurred!"
  • React element:
    <div>An error occurred!</div>
  • Function:
    this.renderError
height Page height. If neither height nor width are defined, page will be rendered at the size defined in PDF. If you define width and height at the same time, height will be ignored. If you define height and scale at the same time, the height will be multiplied by a given factor. Page's default height 300
imageResourcesPath The path used to prefix the src attributes of annotation SVGs. n/a (pdf.js will fallback to an empty string) "/public/images/"
inputRef A prop that behaves like ref, but it's passed to main <div> rendered by <Page> component. n/a
  • Function:
    (ref) => { this.myPage = ref; }
  • Ref created using React.createRef:
    this.ref = React.createRef();

    inputRef={this.ref}
  • Ref created using React.useRef:
    const ref = React.useRef();

    inputRef={ref}
loading What the component should display while loading. "Loading page…"
  • String:
    "Please wait!"
  • React element:
    <div>Please wait!</div>
  • Function:
    this.renderLoader
noData What the component should display in case of no data. "No page specified."
  • String:
    "Please select a page."
  • React element:
    <div>Please select a page.</div>
  • Function:
    this.renderNoData
onLoadError Function called in case of an error while loading the page. n/a (error) => alert('Error while loading page! ' + error.message)
onLoadProgress Function called, potentially multiple times, as the loading progresses. n/a ({ loaded, total }) => alert('Loading a document: ' + (loaded / total) * 100 + '%');
onLoadSuccess Function called when the page is successfully loaded. n/a (page) => alert('Now displaying a page number ' + page.pageNumber + '!')
onRenderError Function called in case of an error while rendering the page. n/a (error) => alert('Error while loading page! ' + error.message)
onRenderSuccess Function called when the page is successfully rendered on the screen. n/a () => alert('Rendered the page!')
onGetAnnotationsSuccess Function called when annotations are successfully loaded. n/a (annotations) => alert('Now displaying ' + annotations.length + ' annotations!')
onGetAnnotationsError Function called in case of an error while loading annotations. n/a (error) => alert('Error while loading annotations! ' + error.message)
onGetTextSuccess Function called when text layer items are successfully loaded. n/a (items) => alert('Now displaying ' + items.length + ' text layer items!')
onGetTextError Function called in case of an error while loading text layer items. n/a (error) => alert('Error while loading text layer items! ' + error.message)
pageIndex Which page from PDF file should be displayed, by page index. 0 1
pageNumber Which page from PDF file should be displayed, by page number. If provided, pageIndex prop will be ignored. 1 2
renderAnnotationLayer Whether annotations (e.g. links) should be rendered. true false
renderInteractiveForms Whether interactive forms should be rendered. renderAnnotationLayer prop must be set to true. false true
renderMode Rendering mode of the document. Can be "canvas", "svg" or "none". "canvas" "svg"
renderTextLayer Whether a text layer should be rendered. true false
rotate Rotation of the page in degrees. 90 = rotated to the right, 180 = upside down, 270 = rotated to the left. Page's default setting, usually 0 90
scale Page scale. 1.0 0.5
width Page width. If neither height nor width are defined, page will be rendered at the size defined in PDF. If you define width and height at the same time, height will be ignored. If you define width and scale at the same time, the width will be multiplied by a given factor. Page's default width 300

Outline

Displays an outline (table of contents). Should be placed inside <Document />. Alternatively, it can have pdf prop passed, which can be obtained from <Document />'s onLoadSuccess callback function.

Props

Prop name Description Default value Example values
className Class name(s) that will be added to rendered element along with the default react-pdf__Outline. n/a
  • String:
    "custom-class-name-1 custom-class-name-2"
  • Array of strings:
    ["custom-class-name-1", "custom-class-name-2"]
inputRef A prop that behaves like ref, but it's passed to main <div> rendered by <Outline> component. n/a
  • Function:
    (ref) => { this.myOutline = ref; }
  • Ref created using React.createRef:
    this.ref = React.createRef();

    inputRef={this.ref}
  • Ref created using React.useRef:
    const ref = React.useRef();

    inputRef={ref}
onItemClick Function called when an outline item has been clicked. Usually, you would like to use this callback to move the user wherever they requested to. n/a ({ pageNumber }) => alert('Clicked an item from page ' + pageNumber + '!')
onLoadError Function called in case of an error while retrieving the outline. n/a (error) => alert('Error while retrieving the outline! ' + error.message)
onLoadSuccess Function called when the outline is successfully retrieved. n/a (outline) => alert('The outline has been successfully retrieved.')

Useful links

License

The MIT License.

Author

Wojciech Maj
[email protected]
http://wojtekmaj.pl

Thank you

This project wouldn't be possible without awesome work of Niklas Närhinen [email protected] who created its initial version and without Mozilla, author of pdf.js. Thank you!

Sponsors

Thank you to all our sponsors! Become a sponsor and get your image on our README on GitHub.

Backers

Thank you to all our backers! Become a backer and get your image on our README on GitHub.

Top Contributors

Thank you to all our contributors that helped on this project!

Top Contributors

Comments
  • react-scripts: 2.0.3 breaks dependencies in lib/display/api.js and build/pdf.js v3.0.5

    react-scripts: 2.0.3 breaks dependencies in lib/display/api.js and build/pdf.js v3.0.5

    Updating create-react-app to v2.0.3 has resulted in this node module to not load PDFs.

    Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
    
    ./node_modules/pdfjs-dist/lib/display/api.js
    Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
    
    ./node_modules/pdfjs-dist/lib/display/api.js
    Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
    
    ./node_modules/pdfjs-dist/lib/display/api.js
    Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
    
    ./node_modules/pdfjs-dist/build/pdf.js
    Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
    
    ./node_modules/pdfjs-dist/build/pdf.js
    Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
    
    ./node_modules/pdfjs-dist/lib/display/api.js
    Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
    
    ./node_modules/pdfjs-dist/build/pdf.js
    

    Describe solutions you've tried

    Deleting the module and reinstalling via npm install has resulted in the same issue.

    Additional information

    If applicable, add screenshots (preferably with browser console open) and files you have an issue with to help explain your problem.

    Environment

    • Browser (if applicable) [e.g. Chrome 57, Firefox 59]: N/A
    • React-PDF version [e.g. 3.0.4]: 3.0.5
    • React version [e.g. 16.3.0]: 16.4.1
    • Webpack version (if applicable) [e.g. 4.16.2]: 4.19.1
    • React scripts: 2.0.3
    bug 
    opened by lilcorey 81
  • Please help me testing React-PDF 5.0 beta update!

    Please help me testing React-PDF 5.0 beta update!

    Hi, React-PDF v5.0.0-beta.5 has been released introducing a few major updates:

    • React-PDF now ships with ES6 Modules
    • Updated pdf.js from 2.1.266 to 2.4.456.

    Breaking changes:

    • You will need to change your imports to bundler-specific entry files, for example instead of:
      import { Document } from 'react-pdf/dist/entry.webpack';
      

      you'll now write:

      import { Document } from 'react-pdf/dist/esm/entry.webpack';
      
    • Dropped support for IE 11 due to pdf.js dropping support

    so upgrade should be a piece of cake.

    Please share your experiences - whether it works correctly in your project, doesn't break the build, and so on.

    Thanks!

    help wanted 
    opened by wojtekmaj 41
  • Webpack production bundling react-pdf is super slow

    Webpack production bundling react-pdf is super slow

    Hello,

    Am I the only one experiencing slow build times in production mode? it takes Webpack like 180seconds to build/minify pdf+worker js files, which are probably a peer dependency?

    Have anyone found a working solution to ship it to production without too long bundling times?

    Cheers

    help wanted question 
    opened by mvirbicianskas 40
  • Failed to load PDF file

    Failed to load PDF file

    i am having trouble showing pdf file tried every way from importing as file and directory giving path it is giving an error Failed to load PDF file. And When I am using webpack or parcel it just showing loading PDF.

    Code

    import React, { Component } from 'react';
    import logo from './logo.svg';
    import './App.css';
    import { Document, Page } from 'react-pdf'
    import lesson2 from './lesson2.pdf'
    class App extends Component {
      state = { numPages: null, pageNumber: 1 };
    
      onDocumentLoadSuccess = ({ numPages }) => {
        this.setState({ numPages });
      };
    
      goToPrevPage = () =>
        this.setState(state => ({ pageNumber: state.pageNumber - 1 }));
      goToNextPage = () =>
        this.setState(state => ({ pageNumber: state.pageNumber + 1 }));
    
      render() {
        const { pageNumber, numPages } = this.state;
    
        return (
          <div>
            <nav>
              <button onClick={this.goToPrevPage}>Prev</button>
              <button onClick={this.goToNextPage}>Next</button>
            </nav>
    
            <div style={{ width: 600 }}>
              <Document
                file={lesson2}
                onLoadSuccess={this.onDocumentLoadSuccess}
              >
                <Page pageNumber={pageNumber} width={600} />
              </Document>
            </div>
    
            <p>
              Page {pageNumber} of {numPages}
            </p>
          </div>
        );
      }
    }
    
    export default App;
    

    Folder Structure

    capture1

    question 
    opened by saadpasta 34
  • react-pdf is not working when build with nextjs

    react-pdf is not working when build with nextjs

    It's working fine on development mode with nextjs. However when I build my nextjs app, it gives me an error that worker.js is not found(404). It looks that *.worker.js is existed in .next director. next bundle Can you point me to a way to resolve it.

    Thanks for your time.

    404 not found

    help wanted question stale 
    opened by nyamba 33
  • How to set 100% width?

    How to set 100% width?

    Is there a way to set 100% width to the pdf so that it occupies the full width of the container? I can see width property takes input only in pixels but not in percentage.

    question 
    opened by shamanth7077 28
  • Visiting react-pdf throws Unhandled rejection: DataCloneError in IE10 on Windows <10

    Visiting react-pdf throws Unhandled rejection: DataCloneError in IE10 on Windows <10

    It looks like react-pdf is not compatible with IE11 and IE10 on Windows version 8.1 (tested through Browserstack). IE11 on Windows 10 does not have this problem. An Unhandled rejection: DataCloneError error is thrown. Tried it with several PDF's, including the react-pdf sample at http://projekty.wojtekmaj.pl/react-pdf/

    I found this closed pdf.js issue which seems related. Any idea?

    bug 
    opened by michaeldzjap 28
  • Unexpected token <

    Unexpected token <

    Hi,

    Thank you for maintaining this awesome package :)

    I'm trying to use it in my React app but I get the following error in the console and the component is stuck on loading:

    Uncaught SyntaxError: Unexpected token < http://project_server.dev/app_folder/d58d9dd3a5c5f2a8eafb.worker.js

    I'm loading a base64 PDF served by my Laravel backend. I'm using webpack and everything seem properly set up. The base64 PDF seems file too.

    Any idea what I'm doing wrong?

    Many thanks

    question 
    opened by valentinfily 28
  • require is not defined -  pdf is not rendered on Chrome

    require is not defined - pdf is not rendered on Chrome

    Before you start - checklist

    • [x] I followed instructions in documentation written for my React-PDF version
    • [x] I have checked if this bug is not already reported
    • [x] I have checked if an issue is not listed in Known issues
    • [x] If I have a problem with PDF rendering, I checked if my PDF renders properly in Mozilla Firefox

    Description

    After updating the react-pdf library from 5.2.0 to 5.3.0 pdf stopped being rendered on Chrome. All I can see is: Failed to load PDF file.

    On the google chrome console I can find:

    Uncaught ReferenceError: require is not defined

    Zrzut ekranu 2021-05-12 o 11 21 46 Zrzut ekranu 2021-05-12 o 11 22 07

    This problem exists only on google chrome because everything works without any problem on Firefox 88.0.

    Environment

    • Browser: Chrome 90
    • React-PDF version: 5.3.0
    • React version: 17.0.2
    • Webpack version: 4.44.2
    bug help wanted 
    opened by tomaszzmudzinski 25
  • Compatibility with Webpack 4 / Create React App 2

    Compatibility with Webpack 4 / Create React App 2

    Due to PDF.js being tightly coupled with worker-loader, at the moment we can't update the code so that it works with Webpack 4 flawlessly. It might work, but no guarantees can be made.

    The issue has been filed against Mozilla's PDF.js in mozilla/pdf.js#9580 to separate Webpack specific code to another package, which would give us much more flexibility regarding fighting issues like that.

    This issue is to be monitored.

    enhancement 
    opened by wojtekmaj 25
  • Textlayer out of alignment

    Textlayer out of alignment

    Description

    The textContent on this particular PDF seems out of alignment with what's rendered on the canvas, meaning copying and pasting is really difficult. This appears to be fine in vanilla PDF.js.

    I'll try and look into this myself, but I'm not really sure how the whole thing works. Any help fixing this would be lovely. 😄

    Steps to reproduce

    1. Try rendering the following PDF in React PDF: http://moco17.movementcomputing.org/wp-content/uploads/2017/12/poster4-donneaud.pdf
    2. Try highlighting and copying text from the abstract, a good example being "This soft input device - Musical Skin".

    Expected behavior

    It should highlight and copy the text your cursor is running over.

    Additional information

    If applicable, add screenshots (preferably with browser console open) and files you have an issue with to help explain your problem.

    Environment

    • Browser: 71.0.3578.98
    • React-PDF version: 4.0.2
    • React version: 16.4.2
    question 
    opened by jimmythompson 24
  • Bump eslint from 8.26.0 to 8.28.0

    Bump eslint from 8.26.0 to 8.28.0

    Bumps eslint from 8.26.0 to 8.28.0.

    Release notes

    Sourced from eslint's releases.

    v8.28.0

    Features

    • 63bce44 feat: add ignoreClassFieldInitialValues option to no-magic-numbers (#16539) (Milos Djermanovic)
    • 8385ecd feat: multiline properties in rule key-spacing with option align (#16532) (Francesco Trotta)
    • a4e89db feat: no-obj-calls support Intl (#16543) (Sosuke Suzuki)

    Bug Fixes

    • c50ae4f fix: Ensure that dot files are found with globs. (#16550) (Nicholas C. Zakas)
    • 9432b67 fix: throw error for first unmatched pattern (#16533) (Milos Djermanovic)
    • e76c382 fix: allow * 1 when followed by / in no-implicit-coercion (#16522) (Milos Djermanovic)

    Documentation

    • 34c05a7 docs: Language Options page intro and tweaks (#16511) (Ben Perlmutter)
    • 3e66387 docs: add intro and edit ignoring files page (#16510) (Ben Perlmutter)
    • 436f712 docs: fix Header UI inconsistency (#16464) (Tanuj Kanti)
    • f743816 docs: switch to wrench emoji for auto-fixable rules (#16545) (Bryan Mishkin)
    • bc0547e docs: improve styles for versions and languages page (#16553) (Nitin Kumar)
    • 6070f58 docs: clarify esquery issue workaround (#16556) (Milos Djermanovic)
    • b48e4f8 docs: Command Line Interface intro and tweaks (#16535) (Ben Perlmutter)
    • b92b30f docs: Add Rules page intro and content tweaks (#16523) (Ben Perlmutter)
    • 1769b42 docs: Integrations page introduction (#16548) (Ben Perlmutter)
    • a8d0a57 docs: make table of contents sticky on desktop (#16506) (Sam Chen)
    • a01315a docs: fix route of japanese translation site (#16542) (Tanuj Kanti)
    • 0515628 docs: use emoji instead of svg for deprecated rule (#16536) (Bryan Mishkin)
    • 68f1288 docs: set default layouts (#16484) (Percy Ma)
    • 776827a docs: init config about specifying shared configs (#16483) (Percy Ma)
    • 5c39425 docs: fix broken link to plugins (#16520) (Ádám T. Nagy)
    • c97c789 docs: Add missing no-new-native-nonconstructor docs code fence (#16503) (Brandon Mills)

    Chores

    • e94a4a9 chore: Add tests to verify #16038 is fixed (#16538) (Nicholas C. Zakas)
    • e13f194 chore: stricter validation of meta.docs.description in core rules (#16529) (Milos Djermanovic)
    • 72dbfbc chore: use pkg parameter in getNpmPackageVersion (#16525) (webxmsj)

    v8.27.0

    Features

    • f14587c feat: new no-new-native-nonconstructor rule (#16368) (Sosuke Suzuki)
    • 978799b feat: add new rule no-empty-static-block (#16325) (Sosuke Suzuki)
    • 69216ee feat: no-empty suggest to add comment in empty BlockStatement (#16470) (Nitin Kumar)
    • 319f0a5 feat: use context.languageOptions.ecmaVersion in core rules (#16458) (Milos Djermanovic)

    Bug Fixes

    • c3ce521 fix: Ensure unmatched glob patterns throw an error (#16462) (Nicholas C. Zakas)
    • 886a038 fix: handle files with unspecified path in getRulesMetaForResults (#16437) (Francesco Trotta)

    Documentation

    • ce93b42 docs: Stylelint property-no-unknown (#16497) (Nick Schonning)
    • d2cecb4 docs: Stylelint declaration-block-no-shorthand-property-overrides (#16498) (Nick Schonning)
    • 0a92805 docs: stylelint color-hex-case (#16496) (Nick Schonning)
    • 74a5af4 docs: fix stylelint error (#16491) (Milos Djermanovic)

    ... (truncated)

    Changelog

    Sourced from eslint's changelog.

    v8.28.0 - November 18, 2022

    • 34c05a7 docs: Language Options page intro and tweaks (#16511) (Ben Perlmutter)
    • 3e66387 docs: add intro and edit ignoring files page (#16510) (Ben Perlmutter)
    • 436f712 docs: fix Header UI inconsistency (#16464) (Tanuj Kanti)
    • f743816 docs: switch to wrench emoji for auto-fixable rules (#16545) (Bryan Mishkin)
    • bc0547e docs: improve styles for versions and languages page (#16553) (Nitin Kumar)
    • 6070f58 docs: clarify esquery issue workaround (#16556) (Milos Djermanovic)
    • b48e4f8 docs: Command Line Interface intro and tweaks (#16535) (Ben Perlmutter)
    • b92b30f docs: Add Rules page intro and content tweaks (#16523) (Ben Perlmutter)
    • 1769b42 docs: Integrations page introduction (#16548) (Ben Perlmutter)
    • 63bce44 feat: add ignoreClassFieldInitialValues option to no-magic-numbers (#16539) (Milos Djermanovic)
    • c50ae4f fix: Ensure that dot files are found with globs. (#16550) (Nicholas C. Zakas)
    • a8d0a57 docs: make table of contents sticky on desktop (#16506) (Sam Chen)
    • 9432b67 fix: throw error for first unmatched pattern (#16533) (Milos Djermanovic)
    • 8385ecd feat: multiline properties in rule key-spacing with option align (#16532) (Francesco Trotta)
    • a4e89db feat: no-obj-calls support Intl (#16543) (Sosuke Suzuki)
    • a01315a docs: fix route of japanese translation site (#16542) (Tanuj Kanti)
    • e94a4a9 chore: Add tests to verify #16038 is fixed (#16538) (Nicholas C. Zakas)
    • 0515628 docs: use emoji instead of svg for deprecated rule (#16536) (Bryan Mishkin)
    • e76c382 fix: allow * 1 when followed by / in no-implicit-coercion (#16522) (Milos Djermanovic)
    • 68f1288 docs: set default layouts (#16484) (Percy Ma)
    • e13f194 chore: stricter validation of meta.docs.description in core rules (#16529) (Milos Djermanovic)
    • 776827a docs: init config about specifying shared configs (#16483) (Percy Ma)
    • 72dbfbc chore: use pkg parameter in getNpmPackageVersion (#16525) (webxmsj)
    • 5c39425 docs: fix broken link to plugins (#16520) (Ádám T. Nagy)
    • c97c789 docs: Add missing no-new-native-nonconstructor docs code fence (#16503) (Brandon Mills)

    v8.27.0 - November 6, 2022

    • f14587c feat: new no-new-native-nonconstructor rule (#16368) (Sosuke Suzuki)
    • 978799b feat: add new rule no-empty-static-block (#16325) (Sosuke Suzuki)
    • ce93b42 docs: Stylelint property-no-unknown (#16497) (Nick Schonning)
    • d2cecb4 docs: Stylelint declaration-block-no-shorthand-property-overrides (#16498) (Nick Schonning)
    • 0a92805 docs: stylelint color-hex-case (#16496) (Nick Schonning)
    • c3ce521 fix: Ensure unmatched glob patterns throw an error (#16462) (Nicholas C. Zakas)
    • 74a5af4 docs: fix stylelint error (#16491) (Milos Djermanovic)
    • 69216ee feat: no-empty suggest to add comment in empty BlockStatement (#16470) (Nitin Kumar)
    • 324db1a docs: explicit stylelint color related rules (#16465) (Nick Schonning)
    • 94dc4f1 docs: use Stylelint for HTML files (#16468) (Nick Schonning)
    • cc6128d docs: enable stylelint declaration-block-no-duplicate-properties (#16466) (Nick Schonning)
    • d03a8bf docs: Add heading to justification explanation (#16430) (Maritaria)
    • 886a038 fix: handle files with unspecified path in getRulesMetaForResults (#16437) (Francesco Trotta)
    • 319f0a5 feat: use context.languageOptions.ecmaVersion in core rules (#16458) (Milos Djermanovic)
    • 8a15968 docs: add Stylelint configuration and cleanup (#16379) (Nick Schonning)
    • 9b0a469 docs: note commit messages don't support scope (#16435) (Andy Edwards)
    • 1581405 docs: improve context.getScope() docs (#16417) (Ben Perlmutter)
    • b797149 docs: update formatters template (#16454) (Milos Djermanovic)
    • 5ac4de9 docs: fix link to formatters on the Core Concepts page (#16455) (Vladislav)
    • 33313ef docs: core-concepts: fix link to semi rule (#16453) (coderaiser)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump react-pdf from 6.0.0 to 6.1.1 in /sample/parcel2

    Bump react-pdf from 6.0.0 to 6.1.1 in /sample/parcel2

    Bumps react-pdf from 6.0.0 to 6.1.1.

    Release notes

    Sourced from react-pdf's releases.

    v6.1.1

    Bug fixes

    • Fixed text items misaligned when using customTextRenderer and if textContent items have both text and line break (#1173).

    v6.1.0

    What's new?

    • Improved text selection behavior (#1034).

    v6.0.3

    Bug fixes

    • Fixed customTextRenderer called too often and potentially with undefined str (#1151).
    • Fixed text layer rendering twice when using React 18 w. StrictMode on.

    v6.0.2

    Bug fixes

    • Fixed Vite specific entry causing fake worker to be initialized (#1148).

    v6.0.1

    Bug fixes

    • Fixed Vite specific entry causing build to fail (#1148).
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump react-pdf from 6.0.0 to 6.1.1 in /sample/webpack4

    Bump react-pdf from 6.0.0 to 6.1.1 in /sample/webpack4

    Bumps react-pdf from 6.0.0 to 6.1.1.

    Release notes

    Sourced from react-pdf's releases.

    v6.1.1

    Bug fixes

    • Fixed text items misaligned when using customTextRenderer and if textContent items have both text and line break (#1173).

    v6.1.0

    What's new?

    • Improved text selection behavior (#1034).

    v6.0.3

    Bug fixes

    • Fixed customTextRenderer called too often and potentially with undefined str (#1151).
    • Fixed text layer rendering twice when using React 18 w. StrictMode on.

    v6.0.2

    Bug fixes

    • Fixed Vite specific entry causing fake worker to be initialized (#1148).

    v6.0.1

    Bug fixes

    • Fixed Vite specific entry causing build to fail (#1148).
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump react-pdf from 6.0.0 to 6.1.1 in /sample/create-react-app-5

    Bump react-pdf from 6.0.0 to 6.1.1 in /sample/create-react-app-5

    Bumps react-pdf from 6.0.0 to 6.1.1.

    Release notes

    Sourced from react-pdf's releases.

    v6.1.1

    Bug fixes

    • Fixed text items misaligned when using customTextRenderer and if textContent items have both text and line break (#1173).

    v6.1.0

    What's new?

    • Improved text selection behavior (#1034).

    v6.0.3

    Bug fixes

    • Fixed customTextRenderer called too often and potentially with undefined str (#1151).
    • Fixed text layer rendering twice when using React 18 w. StrictMode on.

    v6.0.2

    Bug fixes

    • Fixed Vite specific entry causing fake worker to be initialized (#1148).

    v6.0.1

    Bug fixes

    • Fixed Vite specific entry causing build to fail (#1148).
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump react-pdf from 6.0.0 to 6.1.1 in /sample/parcel

    Bump react-pdf from 6.0.0 to 6.1.1 in /sample/parcel

    Bumps react-pdf from 6.0.0 to 6.1.1.

    Release notes

    Sourced from react-pdf's releases.

    v6.1.0

    What's new?

    • Improved text selection behavior (#1034).

    v6.0.3

    Bug fixes

    • Fixed customTextRenderer called too often and potentially with undefined str (#1151).
    • Fixed text layer rendering twice when using React 18 w. StrictMode on.

    v6.0.2

    Bug fixes

    • Fixed Vite specific entry causing fake worker to be initialized (#1148).

    v6.0.1

    Bug fixes

    • Fixed Vite specific entry causing build to fail (#1148).
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump react-pdf from 6.0.0 to 6.1.1 in /sample/webpack5

    Bump react-pdf from 6.0.0 to 6.1.1 in /sample/webpack5

    Bumps react-pdf from 6.0.0 to 6.1.1.

    Release notes

    Sourced from react-pdf's releases.

    v6.1.0

    What's new?

    • Improved text selection behavior (#1034).

    v6.0.3

    Bug fixes

    • Fixed customTextRenderer called too often and potentially with undefined str (#1151).
    • Fixed text layer rendering twice when using React 18 w. StrictMode on.

    v6.0.2

    Bug fixes

    • Fixed Vite specific entry causing fake worker to be initialized (#1148).

    v6.0.1

    Bug fixes

    • Fixed Vite specific entry causing build to fail (#1148).
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Releases(v6.1.1)
  • v6.1.1(Nov 20, 2022)

  • v6.1.0(Nov 15, 2022)

  • v6.0.3(Nov 10, 2022)

    Bug fixes

    • Fixed customTextRenderer called too often and potentially with undefined str (#1151).
    • Fixed text layer rendering twice when using React 18 w. StrictMode on.
    Source code(tar.gz)
    Source code(zip)
  • v6.0.2(Nov 9, 2022)

  • v6.0.1(Nov 8, 2022)

  • v6.0.0(Nov 8, 2022)

    See Upgrade guide from version 5.x to 6.x.

    Note: React <16.8 is not supported. If you're still using React older than 16.8, please use [email protected]^5.0.0 instead.

    ❗️ = breaking change

    What's new?

    • ❗️ Vastly improved performance and bundle size thanks to the modern version of PDF.js that is now used. This drops support for legacy browsers. See README for details.
    • Added official support for Vite.
    • Updated PDF.js to 2.16.105 (#1019).
      • Improvements for the text layer (space insertion)
      • Improvements for canvas rendering (thin line rendering)
      • Improvements for forms (printing/saving of choice lists)
      • Improvements for accessibility (sidebar and search results)
      • Bug fixes and optimizations, in particular for annotations, font/image conversion, SMask rendering, text layer rendering and TypeScript definitions
      • Performance improvements for rendering image masks, Type3 fonts and certain drawing instructions
      • Support for specifying custom background/foreground colors for rendering in the viewer (this will be soon be supported in React-PDF)
      • Bugfixes
      • Accessibility improvements
      • Rendering quality improvements.
    • Improved documentation.
      • Fixed instructions on PDF.js worker
      • Added missing documentation on onRenderTextLayerError and onRenderTextLayerSuccess
      • Added a note on SVG mode deprecation.
    • Refactored TextLayer to use pdfjs.renderTextLayer (#944).
      • Added support for onRenderTextLayerError prop
      • Added support for onRenderTextLayerSuccess prop.
    • React-PDF now warns if required CSS files are not imported.

    What's changed?

    • ❗️ Minimum React version is now 16.8.
    • ❗️ onGetTextSuccess is now called with an object containing items and styles.
    • ❗️ TextLayer.css now must be imported manually for TextLayer to work properly.
    • ❗️ Dropped support for React content in customTextRenderer (#1124).
    • file-loader is now an optional peerDependency (#970). Thanks, @rpaasche!
    • Improved documentation on Preact compatibility.
    • Replaced merge-class-names with clsx.

    Bug fixes

    • Fixed crash when attempting to cancel rendering of PageCanvas.
    • Fixed crash when text layer in PDFs rendered by React-PDF was used in Preact applications.
    • Fixed legacy renderInteractiveForms prop ignored. Thanks, @liquidautumn!
    • Fixed Page wrapper allowing to shrink causing children to overflow (#1118).
    Source code(tar.gz)
    Source code(zip)
  • v6.0.0-beta.6(Nov 8, 2022)

  • v6.0.0-beta.5(Nov 5, 2022)

    ❗️ = breaking change

    What's new?

    • Added official support for Vite.
    • Removed dependency on @babel/runtime.

    What's changed?

    • ❗️ Dropped support for React content in customTextRenderer (#1124).

    Bug fixes

    • Fixed Page wrapper allowing to shrink causing children to overflow (#1118).
    Source code(tar.gz)
    Source code(zip)
  • v6.0.0-beta.4(Oct 7, 2022)

    What's new?

    • Updated PDF.js to 2.16.105.
      • Bugfixes
      • Accessibility improvements
      • Rendering quality improvements.
    • Improved documentation.
      • Fixed instructions on PDF.js worker
      • Added missing documentation on onRenderTextLayerError and onRenderTextLayerSuccess
      • Added a note on SVG mode deprecation.
    • React-PDF now warns if required CSS files are not imported.

    What's changed?

    • Removed support for enhanceTextSelection prop. This was previously implemented in 6.0.0-beta, but later found deprecated in PDF.js.

    Bug fixes

    • Fixed legacy renderInteractiveForms prop ignored. Thanks, @liquidautumn!
    Source code(tar.gz)
    Source code(zip)
  • v6.0.0-beta.3(Jul 27, 2022)

  • v6.0.0-beta.2(Jul 5, 2022)

    What's changed?

    • Improved documentation on Preact compatibility.

    Bug fixes

    • Fixed crash when text layer in PDFs rendered by React-PDF was used in Preact applications.
    Source code(tar.gz)
    Source code(zip)
  • v6.0.0-beta(Jul 5, 2022)

    See Upgrade guide from version 5.x to 6.x.

    Note: React <16.8 is not supported. If you're still using React older than 16.8, please use [email protected]^5.0.0 instead.

    ❗️ = breaking change

    What's new?

    • ❗️ Vastly improved performance and bundle size thanks to the modern version of PDF.js that is now used. This drops support for legacy browsers. See README for details.
    • Updated PDF.js to 2.14.305 (#1019).
      • Improvements for the text layer (space insertion)
      • Improvements for canvas rendering (thin line rendering)
      • Improvements for forms (printing/saving of choice lists)
      • Improvements for accessibility (sidebar and search results).
      • Bug fixes and optimizations, in particular for annotations, font/image conversion, SMask rendering, text layer rendering and TypeScript definitions.
      • Performance improvements for rendering image masks, Type3 fonts and certain drawing instructions
      • Support for specifying custom background/foreground colors for rendering in the viewer (this will be soon be supported in React-PDF).
    • Refactored TextLayer to use pdfjs.renderTextLayer (#944).
      • Added support for enhanceTextSelection prop.
      • Added support for onRenderTextLayerError prop.
      • Added support for onRenderTextLayerSuccess prop.

    What's changed?

    • ❗️ Minimum React version is now 16.8.
    • ❗️ onGetTextSuccess is now called with an object containing items and styles.
    • ❗️ TextLayer.css now must be imported manually for TextLayer to work properly.

    Bug fixes

    • Fixed crash when attempting to cancel rendering of PageCanvas.
    Source code(tar.gz)
    Source code(zip)
  • v5.7.2(Mar 30, 2022)

    What's new?

    • Added instructions on support for standard fonts.
    • Make findDocumentSource cancellable, cancel running tasks in loadDocument before finding source (#947).

    Bug fixes

    • Fixed Page not rendering in canvas rendering mode (default) when using React 18 w. StrictMode on (#972).
    Source code(tar.gz)
    Source code(zip)
  • v5.7.1(Feb 9, 2022)

    What's changed?

    • Replaced deprecated renderInteractiveForms option with annotationMode in page.render call (#946).

    Bug fixes

    • Use workerPort instead of workerSrc in Parcel 2 specific entry (#941). Thanks, @jamesjessian!
    • Fixed regression that caused interactive forms to be always rendered.
    Source code(tar.gz)
    Source code(zip)
  • v5.7.0(Jan 26, 2022)

    Biggest one in months!

    What's new?

    • Added support for React 18.
    • Added official support for Parcel 2.
    • Added new Webpack 5-specific entry file. It uses Webpack's new URL assets instead of worker-loader, which turned out to be quite problematic in the past. Don't worry, if you want to stick to the old Webpack-specific one, it should still work just fine!
    • Updated PDF.js to 2.12.313 (#936).
      • Improved XFA support
      • Improved pattern/tiling support
      • Rich text annotation support
    • Added support for externalLinkRel prop.
    • Added dest and pageIndex to onItemClick callbacks (#812, #924). Thanks, @malwilley!

    What's changed?

    • Updated cMaps instructions to work with Yarn PnP.
    • Updated PDF.js worker instructions for clarity.
      • Specify how to make it work with Create React App 5.
    • Added instructions on how to manually copy cMaps directory.
    • Added instructions on how to manually copy pdf.worker.js.
    • Added Create React App 5 sample suite.
    • Added Parcel 2 sample suite.
    Source code(tar.gz)
    Source code(zip)
  • v5.6.0(Dec 13, 2021)

  • v5.5.0(Oct 25, 2021)

  • v5.4.1(Oct 19, 2021)

  • v5.4.0(Sep 27, 2021)

    What's new?

    • Updated PDF.js to 2.9.359 (#818).
      • Added support for Signatures (#559, #691, #772, #817).
      • Fixed rendering on Chrome 92 and up (#819).
    • Replaced pdfjs-dist build with legacy ES5 version (#794). Thanks, @njleonzhang!
    • Changed async/await syntax to Promises, reducing build size significantly (#807).

    Bug fixes

    • Fixed annotation links no longer working in some cases (#816).
    Source code(tar.gz)
    Source code(zip)
  • v5.4.0-beta.3(Sep 1, 2021)

  • v5.4.0-beta.2(Jul 27, 2021)

    What's new?

    • Updated PDF.js to 2.9.359 (#818).
      • Added support for Signatures (#559, #691, #772, #817).
      • Fixed rendering on Chrome 92 and up (#819).

    Bug fixes

    • Fixed annotation links no longer working in some cases (#816).
    Source code(tar.gz)
    Source code(zip)
  • v5.4.0-beta(Jul 8, 2021)

  • v5.3.2(Jul 8, 2021)

  • v5.3.1(Jul 7, 2021)

    What's changed?

    • Made documentation on bundler-specific entry files clearer.
    • Minor code optimizations for smaller bundle size.

    Bug fixes

    • Fixed onLoadProgress incorrectly listed as Page prop in README.
    • Fixed data URI not parsed properly when having multiple headers (#784).
    Source code(tar.gz)
    Source code(zip)
  • v5.3.0(May 8, 2021)

    What's new?

    • Updated PDF.js from 2.5.207 to 2.6.347 (#746). Thanks, @andi-dev!
    • Replaced worker-loader with file-loader in Webpack-specific entry file (#93, #291, #496, #530, #558, #613, #685, #734, #756). Webpack-specific entry file now works with Create React App.
    • Improved memory management by destroying previous worker when file changes (#288, #305, #755). Thanks, @jeetiss!

    What's changed?

    • Replaced PDFLinkService with custom LinkService (#657, #659, #749).
    • Use public API for rendering cancellation (#757). Thanks, @jeetiss!

    Bug fixes

    • Fixed file prop checked using function with the same name.
    Source code(tar.gz)
    Source code(zip)
  • v5.3.0-beta.3(Apr 1, 2021)

    What's new?

    • Improved memory management by destroying previous worker when file changes (#288, #305, #755). Thanks, @jeetiss!

    What's changed?

    • Use public API for rendering cancellation (#757). Thanks, @jeetiss!
    Source code(tar.gz)
    Source code(zip)
  • v5.3.0-beta.2(Apr 1, 2021)

    What's new?

    • Replaced worker-loader with file-loader in Webpack-specific entry file (#93, #291, #496, #530, #558, #613, #685, #734, #756). Webpack-specific entry file now works with Create React App.

    Bug fixes

    • Fixed file prop checked using function with the same name.
    Source code(tar.gz)
    Source code(zip)
  • v5.3.0-beta(Mar 18, 2021)

    What's new?

    • Updated PDF.js from 2.5.207 to 2.6.347 (#746). Thanks, @andi-dev!

    What's changed?

    • Replaced PDFLinkService with custom LinkService (#657, #659, #749).
    Source code(tar.gz)
    Source code(zip)
  • v5.2.0(Feb 15, 2021)

  • v5.1.0(Dec 11, 2020)

Owner
Wojciech Maj
Hi! I'm a JS/React developer from Krakow, Poland. I work for Intive and I'm the maintainer of React-PDF, React-Calendar and many other popular packages.
Wojciech Maj
✉️ Display e-mails in your React.js projects. (Targets Gmail rendering.)

react-letter is a React.js component that allows for an easy display of HTML e-mail content with automatic sanitization. Support for features should m

Mat Sz 232 Nov 14, 2022
React Navigation for React js that tries to ensure that the elements of the navigators display correctly on devices with notches and UI elements which may overlap the app content.

React Navigation for React js that tries to ensure that the elements of the navigators display correctly on devices with notches (e.g. iPhone X) and UI elements which may overlap the app content.

MohammadAli Karimi 12 Dec 7, 2021
Use Pub/Sub pattern inside your React applications easily

spacefold ?? Use Pub/Sub pattern inside your React applications easily! ?? Table of content Demo Why Usage Contribute ?? Demo Like always, a counter a

Pedro Nauck 56 Nov 15, 2022
A website made to display poems as a sharing website and resource for students in Singapore American School

7C Poems This is a website made to display poems as a sharing website and resource for students in Singapore American School. It’s made using React, T

null 1 May 20, 2022
Render images as interactive particles

react-particle-image Render images as interactive particles Install npm install --save react-particle-image Links Demo (source) Docs Simple Usage code

Uvacoder 0 May 28, 2022
📑 A React component to easily create demos of other components

React DemoTab ?? A React component to easily create demos of other components Install npm install react-demo-tab Demo DemoTab example Example import R

mkosir 31 Aug 20, 2022
Mozaïk is a tool based on nodejs / react / redux / nivo / d3 to easily craft beautiful dashboards

Mozaïk is a tool based on nodejs / react / redux / d3 to easily craft beautiful dashboards. See demo Features: Scalable layout Themes support Extendab

Raphaël Benitte 3.6k Nov 13, 2022
Easily download Figma and create SVGs components for Vue, React, Angular and more to come

Easily download Figma and create SVGs components for Vue, React, Angular.

@figus 21 Sep 6, 2022
Twinkle Tray lets you easily manage the brightness levels of multiple monitors

Twinkle Tray lets you easily manage the brightness levels of multiple monitors. Even though Windows 10 is capable of adjusting the backlight on most monitors, it typically doesn't support external monitors. Windows 10 also lacks any ability to manage the brightness of multiple monitors.

Xander Frangos 2.3k Nov 25, 2022
WebApp to check friend's codechef rating & other details easily.

Codechef Cards A WebApp to check friend's codechef rating and other details. Just add username and track your friends progress!! Press delete to remov

Yash Chaudhari 18 Oct 2, 2022
The history library lets you easily manage session history anywhere JavaScript runs.

history · The history library lets you easily manage session history anywhere JavaScript runs. A history object abstracts away the differences in vari

Remix 8k Nov 18, 2022
whatscode.js is a package to create Whatsapp bots easily and quickly, even coding experience is not really needed...

whatscode.js is a package to create Whatsapp bots easily and quickly, even coding experience is not really needed...

JstnLT 21 Oct 29, 2022
Reactivated.app is an open-source app that scans your JS dependencies every 4 hours and generates cool dashboards

Reactivated.app is an open-source app that scans your JS dependencies every 4 hours and generates cool dashboards

Premier Octet 66 Jul 20, 2022
A React Custom able cursor that can decorate your site also your hand is open to manipulate the cursor with css

custom-react-cursor A React Custom able cursor that can decorate your site also your hand is open to manipulate the cursor with css Demo live Installi

amirhossein 18 Nov 9, 2022
Live coding in your browser with your favourite language.

Live coding in your browser with your favourite language.

Fatih Erikli 986 Nov 20, 2021
LocateJS predicts your location by analyzing your connection and system data.

LocateJS predicts your location by analyzing your connection and system data.

z0ccc 281 Nov 2, 2022
Showcase your skills on your Github readme or resumé with ease ✨

Showcase your skills on your GitHub or resumé with ease! Powered by Cloudflare Workers ⚡ Docs Example Specifying Icons Themed Icons Icons Per Line Cen

Thijs [Coding] 1.3k Nov 19, 2022
✨ View all of your GitHub stats and compare your stats with friends, made using nextjs and tailwind.

✨ View all of your GitHub stats and compare your stats with friends, made using nextjs and tailwind.

ashish 10 Sep 6, 2022
🔍 A package with components for building your dream command palette for your web application.

A command palette for React A package with components for building your dream command palette for your web application. Features Installation Example

Albin Groen 644 Nov 24, 2022