React Component for transforming pdf files to image data urls
npm install react-pdf-to-imageA a render prop component wrapper around pdf.js that asynchronously converts PDF files into data URLs in the browser.
``
import React from 'react';
import {PDFtoIMG} from 'react-pdf-to-image';
import file from './pdf-sample.pdf';
const App = () =>
export default App;
`
to the output` options in webpack.config.js. If you're using create-react-app then currently the only option is to eject and add that to your config. Otherwise builds will work fine but webpack-dev-server will not.- Not optimized for loading very large multi-page PDFs and works best when used to convert simple single page documents to Image URLs
- POC atm so there's no tests or error handling.