Skip to content

Commit

Permalink
Adding other missing props to component
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecousins committed May 3, 2019
1 parent 3e77153 commit 88fd629
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 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",
Expand Down
4 changes: 2 additions & 2 deletions 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);
Expand Down

0 comments on commit 88fd629

Please sign in to comment.