diff --git a/package.json b/package.json index 0e419033..080143ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-pdf-js", - "version": "5.0.1", + "version": "5.0.2", "description": "Simple React component to wrap up PDF.js. The easiest way to render PDFs in your React app.", "author": "mikecousins", "license": "MIT", diff --git a/src/index.js b/src/index.js index 038872a4..6fb9ab92 100755 --- a/src/index.js +++ b/src/index.js @@ -1,9 +1,9 @@ import PdfJsLib from 'pdfjs-dist'; import React, { useState, useEffect, useRef, useMemo } from 'react'; -const Pdf = ({ file, onDocumentComplete }) => { +const Pdf = ({ file, onDocumentComplete, page, scale, rotate, cMapUrl, cMapPackged, workerSrc }) => { const canvasEl = useRef(); - const [loading, numPages] = usePdf({ canvasEl, file }); + const [loading, numPages] = usePdf({ canvasEl, file, page, scale, rotate, cMapUrl, cMapPackged, workerSrc }); useEffect(() => { onDocumentComplete(numPages);