{"_id":"@ashutoshshubam/reactjs-pdf-reader-custom","_rev":"2-ffb4997f953d9a59c38a3e780e05c97c","name":"@ashutoshshubam/reactjs-pdf-reader-custom","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.9":{"name":"@ashutoshshubam/reactjs-pdf-reader-custom","_inBundle":false,"_location":"/reactjs-pdf-reader-custom","_phantomChildren":{"loader-utils":"1.2.3","mime":"2.4.0","schema-utils":"1.0.0"},"_requested":{"type":"tag","registry":true,"raw":"reactjs-pdf-reader-custom","name":"reactjs-pdf-reader-custom","escapedName":"reactjs-pdf-reader-custom","rawSpec":"","saveSpec":null,"fetchSpec":"latest"},"_requiredBy":["#USER","/"],"_spec":"reactjs-pdf-reader-custom","author":{"name":"Ashutosh Patel"},"bundleDependencies":false,"dependencies":{"babel-polyfill":"^6.26.0","babel-preset-stage-2":"^6.24.1","less":"^3.8.1","less-loader":"^4.1.0","pdfjs-dist":"2.0.550","react-css-modules":"^4.7.7","ts-loader":"^5.2.2","typings-for-css-modules-loader":"^1.7.0","url-loader":"^1.1.2"},"deprecated":false,"description":"PDF Reader in browser for React js","devDependencies":{"@babel/cli":"^7.1.0","@babel/core":"^7.1.0","@babel/preset-env":"^7.1.0","@babel/preset-react":"^7.0.0","@types/jest":"^23.3.2","@types/node":"^10.10.2","@types/react":"^16.4.14","@types/react-dom":"^16.0.7","awesome-typescript-loader":"^5.2.1","babel-loader":"^8.0.2","css-loader":"^1.0.0","express":"^4.16.3","file-loader":"^2.0.0","html-webpack-plugin":"^3.2.0","image-webpack-loader":"^4.3.1","jest":"^23.6.0","node-sass":"^4.9.3","react":"^16.5.2","react-addons-test-utils":"^15.6.2","react-dom":"^16.5.2","react-hot-loader":"^4.3.11","sass-loader":"^7.1.0","style-loader":"^0.23.0","stylelint":"^9.5.0","stylelint-config-standard":"^18.2.0","stylelint-webpack-plugin":"^0.10.5","tslint":"^5.11.0","typescript":"^3.0.3","uglifyjs-webpack-plugin":"^2.0.1","webpack":"^4.19.1","webpack-cli":"^3.3.9","webpack-dev-middleware":"^3.3.0","webpack-dev-server":"^3.1.8","webpack-merge":"^4.1.4"},"homepage":"https://github.com/ashutoshshubam/reactjs-pdf-reader-custom","keywords":["react","pdf","pdfjs","react-pdf-reader","reactjs-pdf-reader-custom"],"license":"MIT","main":"lib/app.js","repository":{"type":"git","url":"git+https://github.com/ashutoshshubam/reactjs-pdf-reader-custom.git"},"scripts":{"build":"yarn run clean-dist && webpack -p --config=configs/webpack/prod.js","clean-dist":"rm -f -r -d dist","clean-lib":"rm -f -r -d lib","lib":"yarn run clean-lib && webpack --config=configs/webpack/lib.js  --progress --colors","lint":"yarn run lint:ts && yarn run lint:sass","lint:sass":"stylelint ./src/**/*.scss","lint:ts":"tslint --fix './src/**/*.ts*' --format stylish --force","start":"yarn run start-dev","start-dev":"webpack-dev-server --config=configs/webpack/dev.js --open --inline","start-prod":"yarn run build && node express.js","test":"jest --watch --coverage --config=configs/jest.json"},"version":"1.0.9","bugs":{"url":"https://github.com/ashutoshshubam/reactjs-pdf-reader-custom/issues"},"directories":{"lib":"lib","test":"tests"},"gitHead":"66af0a2cee6e840c25e3a7d4386468d64b98ab2c","_id":"@ashutoshshubam/reactjs-pdf-reader-custom@1.0.9","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-d/wBzbMcoCrNiJWQ37zB69bIi84e1SR1aCrRorZzpYsG9igVf6m5woHeVOoVHxVxxCSiUXG2jdNIIOcJtgWhBQ==","shasum":"7b5b8c31bb523bb30ae2aab6540be1810fa605a2","tarball":"https://registry.npmjs.org/@ashutoshshubam/reactjs-pdf-reader-custom/-/reactjs-pdf-reader-custom-1.0.9.tgz","fileCount":61,"unpackedSize":5032725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFcH+CRA9TVsSAnZWagAAiTcP/1607qjsBri/8gIqoWJ8\n0liBRy0MQZQR2+10+SZnwTmoS9I1AjyMQGepLULGRugbmLPSWMPbyLgJHaOU\nqmRLqFO+8olZYuv57hiBcN3YdMYuNu6yWVj4+wQMS8pCdZ8jlhWrMeOla6OC\nECfO5QGeiVJXyEvkIo7I/x9/JnCCqaHfAF88WYcSQ+rnqwjSMB4XDFCvCM1E\nYepQysSYbc+Q/a5pikVvWAo5f7MGQf0Ifi4Fm1asi77VfS75kTSHF7hJG3N2\nsQq1gJ6tPMnbluPcIOozPYwJAQhBQIp1NHTLOjfz6gVAcrJFpa74pIzRbNVY\nolD7XzpKQCMF6wu2oIggu9kpZwA2iGda6NxAuFgwF1Z0SY+8kDPxNR00LNyD\nGUCk2a9k3qwLSImsSzia4Lh6PyD9wJT5mBJdFDSKU2RbOUE7m7LKofvz7w8i\nHdknRmaFmeXtU7Y9V1dE7wQwwX8ik/QO34RgwpUcDEMDLkTgwxhDxccKQcbf\nDJDap5WBMq5zUJD+n7iakm7NS15/ahhY45ZiLWBlOxq73VX6mRQ5xYlngnYB\n3D69GfLVN0IuHMjLZ8cOnwR/WAEY8IQr4LDIZKvOBtfOVtPRbpAdrM97nEOb\nGsblblpQ041IOKxnB+aC/eb0e/q1j5fkXinlxV7kLLfZlBNuoxs63X9GLZ1l\nrw8S\r\n=ViE8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEVh0cE1X7LJ0xopPNkkZ2WnqNkMT+WGJ0b0WTQx/J8oAiA54AH+7tJ0Tg19UdO84v6Rcz4FYKwxP8lJxQ238nENcQ=="}]},"maintainers":[{"name":"ashutoshshubam","email":"ashutoshshubam@gmail.com"}],"_npmUser":{"name":"ashutoshshubam","email":"ashutoshshubam@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reactjs-pdf-reader-custom_1.0.9_1578484221877_0.7091316369839966"},"_hasShrinkwrap":false},"1.1.0":{"name":"@ashutoshshubam/reactjs-pdf-reader-custom","_inBundle":false,"_location":"/reactjs-pdf-reader-custom","_phantomChildren":{"loader-utils":"1.2.3","mime":"2.4.0","schema-utils":"1.0.0"},"_requested":{"type":"tag","registry":true,"raw":"reactjs-pdf-reader-custom","name":"reactjs-pdf-reader-custom","escapedName":"reactjs-pdf-reader-custom","rawSpec":"","saveSpec":null,"fetchSpec":"latest"},"_requiredBy":["#USER","/"],"_spec":"reactjs-pdf-reader-custom","author":{"name":"Ashutosh Patel"},"bundleDependencies":false,"dependencies":{"babel-polyfill":"^6.26.0","babel-preset-stage-2":"^6.24.1","less":"^3.8.1","less-loader":"^4.1.0","pdfjs-dist":"2.0.550","react-css-modules":"^4.7.7","ts-loader":"^5.2.2","typings-for-css-modules-loader":"^1.7.0","url-loader":"^1.1.2"},"deprecated":false,"description":"PDF Reader in browser for React js","devDependencies":{"@babel/cli":"^7.1.0","@babel/core":"^7.1.0","@babel/preset-env":"^7.1.0","@babel/preset-react":"^7.0.0","@types/jest":"^23.3.2","@types/node":"^10.10.2","@types/react":"^16.4.14","@types/react-dom":"^16.0.7","awesome-typescript-loader":"^5.2.1","babel-loader":"^8.0.2","css-loader":"^1.0.0","express":"^4.16.3","file-loader":"^2.0.0","html-webpack-plugin":"^3.2.0","image-webpack-loader":"^4.3.1","jest":"^23.6.0","node-sass":"^4.9.3","react":"^16.5.2","react-addons-test-utils":"^15.6.2","react-dom":"^16.5.2","react-hot-loader":"^4.3.11","sass-loader":"^7.1.0","style-loader":"^0.23.0","stylelint":"^9.5.0","stylelint-config-standard":"^18.2.0","stylelint-webpack-plugin":"^0.10.5","tslint":"^5.11.0","typescript":"^3.0.3","uglifyjs-webpack-plugin":"^2.0.1","webpack":"^4.19.1","webpack-cli":"^3.3.9","webpack-dev-middleware":"^3.3.0","webpack-dev-server":"^3.1.8","webpack-merge":"^4.1.4"},"homepage":"https://github.com/ashutoshshubam/reactjs-pdf-reader-custom","keywords":["react","pdf","pdfjs","react-pdf-reader","reactjs-pdf-reader-custom"],"license":"MIT","main":"lib/app.js","repository":{"type":"git","url":"git+https://github.com/ashutoshshubam/reactjs-pdf-reader-custom.git"},"scripts":{"build":"yarn run clean-dist && webpack -p --config=configs/webpack/prod.js","clean-dist":"rm -f -r -d dist","clean-lib":"rm -f -r -d lib","lib":"yarn run clean-lib && webpack --config=configs/webpack/lib.js  --progress --colors","lint":"yarn run lint:ts && yarn run lint:sass","lint:sass":"stylelint ./src/**/*.scss","lint:ts":"tslint --fix './src/**/*.ts*' --format stylish --force","start":"yarn run start-dev","start-dev":"webpack-dev-server --config=configs/webpack/dev.js --open --inline","start-prod":"yarn run build && node express.js","test":"jest --watch --coverage --config=configs/jest.json"},"version":"1.1.0","bugs":{"url":"https://github.com/ashutoshshubam/reactjs-pdf-reader-custom/issues"},"directories":{"lib":"lib","test":"tests"},"gitHead":"66af0a2cee6e840c25e3a7d4386468d64b98ab2c","_id":"@ashutoshshubam/reactjs-pdf-reader-custom@1.1.0","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-N6Ktz3yI2f02WMHluxfAanfvIdzIZ91lM0nb5flbgusvIhQDa+Iuz7HMFaakuIx7pOIsq/q2Aha4oz6BxmD/Kg==","shasum":"357b8fbdeaca3085732bc0428a16709302315f25","tarball":"https://registry.npmjs.org/@ashutoshshubam/reactjs-pdf-reader-custom/-/reactjs-pdf-reader-custom-1.1.0.tgz","fileCount":61,"unpackedSize":5032732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFcqbCRA9TVsSAnZWagAAKGgQAKNlZZN6gLpdVKx71Peq\nNPypO4h767gvG6Cy1Tz+2MJzUPJeyoD1015cLyt+QUP1vSgKJGf67DlhBxb4\ny/mBYoj75/SJogq6g5YFS+0k3Njeu0ZzuIRdRjdk3pgRohUhuHVSP9gMlOlw\nWqKn8aGfbKE4i8zV0qsT2QFmTNi9/V1JaDGz4+h+B4TQRR+kRpBoJNfrFNcn\nJIwfkDNO9WzCr168UpUBYcA+LGtn7h+4NY6+XtZTvxysU/wyfBgd4nZF14r+\n1B7Z6c83QXuKKY6zBoyLwCb5YUpmV0A1+semWKNGgWOxJ9QHg8SydsO0EF7f\nhUxXFjeax7/O4xyi45UdStqlRWt8gCRuwcYWJOvX5+4hdJe1pxGqxoanXTcO\nJVKLzvaJyR3jzlfzjWGI1J5lyayKc+1O6mexyMMoSpE/9wsEpIsAou/ZBeU8\nRCqtRz/5htzDwL5knivlHBnbPLK2n4dIWAQUwLjZK6DxiCyIJSyi4/+l17bF\n20mOOUkBNVBnuW0rvtEME2gYMM63yzKfKuELkM0pPDHnfiqFM9Y8E4h8MrY2\nkzjJoYzbjaGRR9CsvcBpcLiZpXc0W3Dv+jZrzkrc2GnN4cfoviJdAlnZu6by\nQ+xIiy2qZNpZJgSx0+1dT17/nQotXnI53bmPz+ZnbmSrXvBwZQg3CAtiYBHt\nkQ03\r\n=Y5Md\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCN1C21kruIM1MGfh/eHP0YA3EJllfI8ZqN1f4Q5eexLgIhALpUzqfHojRc4FemzsM4Rsn+0B5fD9HM8ui1YOgRAXXC"}]},"maintainers":[{"name":"ashutoshshubam","email":"ashutoshshubam@gmail.com"}],"_npmUser":{"name":"ashutoshshubam","email":"ashutoshshubam@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reactjs-pdf-reader-custom_1.1.0_1578486427196_0.30546401902319475"},"_hasShrinkwrap":false}},"time":{"created":"2020-01-08T11:50:21.843Z","1.0.9":"2020-01-08T11:50:22.125Z","modified":"2022-04-04T15:46:01.952Z","1.1.0":"2020-01-08T12:27:07.367Z"},"maintainers":[{"name":"ashutoshshubam","email":"ashutoshshubam@gmail.com"}],"description":"PDF Reader in browser for React js","homepage":"https://github.com/ashutoshshubam/reactjs-pdf-reader-custom","keywords":["react","pdf","pdfjs","react-pdf-reader","reactjs-pdf-reader-custom"],"repository":{"type":"git","url":"git+https://github.com/ashutoshshubam/reactjs-pdf-reader-custom.git"},"author":{"name":"Ashutosh Patel"},"bugs":{"url":"https://github.com/ashutoshshubam/reactjs-pdf-reader-custom/issues"},"license":"MIT","readme":"# React-pdf-viewer\n\n> PDF Reader in browser for React 16.x\n\n\n## Features\n\n* **Simple**: It is very easy to use\n* **Mobile-friendly**: Support all mobile terminal devices including mobile,pad and others\n\n## Browser Support\n\n* IE 10+\n* Firefox 3.6+\n* Chrome 6+\n* Safari 6+\n* Opera 11.5+\n* iOS Safari 6.1+\n* Android Browser 3+\n\n## Quick Start\n\n### 1. Import react-read-pdf  into your react.js project.\n\n(You should import react firt,The version of react must be more than 16.x)\n\nUsing build tools:\n\n```bash\nnpm install --save reactjs-pdf-reader-custom\n```\nUsing PDFReader in PC:\n```js\nimport React from 'react';\nimport { PDFReader } from 'reactjs-pdf-reader-custom';\n```\nUsing MobilePDFReader in mobile terminal devices:\n```js\nimport React from 'react';\nimport { MobilePDFReader } from 'reactjs-pdf-reader-custom';\n\n```\n### 2. Now you have it. The simplest usage:\n\n```js\nimport { MobilePDFReader } from 'react-pdf-viewer';\nexport default class Test extends Component{\n  render(){\n    return <div style={{overflow:'scroll',height:600}}>\n            <MobilePDFReader url=\"http://localhost:3000/test.pdf\"/>\n           </div>\n  }\n}\n```\n\n```js\nimport ReactDOM from 'react-dom';\nimport Test from './test'\nReactDOM.render(<Test />, document.getElementById('root'));\n```\n\n## Documentation\n\nreact-read-pdf mainly consists of two different components. ***PDFReader and MobilePDFReader***.\n\n### 🌱 PDFReader\n\n```js\nimport { PDFReader } from 'reactjs-pdf-reader-custom'\n\n...\n<PDFReader url={\"http://localhost:3000/test.pdf\"} ...>\n```\n####  Props in PDFReader Component \n\n<table>\n        <tr>\n            <th>Props name</th>\n            <th>Type</th>\n            <th>Description</th>\n        </tr>\n        <tr>\n            <th>url</th>\n            <th>string | object</th>\n            <th>if url is a string, it represents absolute address or relative address of PDF files. if url is a object, you can see this <a href=\"#url\">url object type </a> for details</th>\n        </tr>\n        <tr>\n            <th>data</th>\n            <th>string</th>\n            <th>binary-like data of PDF.For example,in javascript, you can use the method \"atob\" to convert base64 encoded PDF to binary-like data. </th>\n        </tr>\n        <tr>\n            <th>page</th>\n            <th>number</th>\n            <th>default value is 1 ,decides that which page to show in PDF file.</th>\n        </tr>\n        <tr>\n            <th>scale</th>\n            <th>number</th>\n            <th>decides the viewport in render</th>\n        </tr>\n        <tr>\n            <th>width</th>\n            <th>number</th>\n            <th>decides the width of viewport</th>\n        </tr>\n        <tr>\n            <th>showAllPage</th>\n            <th>boolean</th>\n            <th>default value is false , if it is true , it will render all pages of the pdf file. if it is false ,it will only show the \"currentPage\" according to the page props's value.</th>\n        </tr>\n        <tr>\n            <th>onDocumentComplete</th>\n            <th>function</th>\n            <th>after load the PDF file, in this function ,you can get some informations of the PDF file you can see this <a href=\"#function1\">function type</a> for details</th>\n        </tr>\n        <tr>\n            <th>getPageNumber</th>\n            <th>function</th>\n            <th>after load the PDF file, in this function onclick event you can get current page number of the PDF file</th>\n        </tr>\n    </table>\n    \n    \n    \n<a name=\"url\"><b>url</b></a> \nthe url property of ***PDFReader***\n\nType: \n\n - string : it represents absolute address or relative address of PDF files\n - object :\n \nProperties:\n Property Name| type |Description\n--- | --- | ---\nurl | string | it represents absolute address or relative address of PDF files\nwithCredentials | boolean | is allow requests to carry cookie or not\n\n<a name=\"function1\"><b>onDocumentComplete</b></a> \nthe onDocumentComplete property of ***PDFReader***\n\nType:\n\n - function(totalPage)\n\nonDocumentComplete's type is a function, the fisrt default parameter is  totalPage of the PDF file\n \n#### Notes\n\nThe url of props can be string or object.\n\nThe following two ways are the same.\n\nOne is :\n\n```js\n <MobilePDFReader url=\"http://localhost:3000/test.pdf\"/>\n\n```\nthe other is :\n```js\n <MobilePDFReader url={url:\"http://localhost:3000/test.pdf\"}/>\n\n```\n### 🌱 MobilePDFReader\n\n```js\nimport { MobilePDFReader } from 'reactjs-pdf-reader-custom'\n\n...\n<MobilePDFReader url={\"http://localhost:3000/test.pdf\"} ...>\n```\n\n####  Props in MobilePDFReader Component \n<table>\n        <tr>\n            <th>Props name</th>\n            <th>Type</th>\n            <th>Description</th>\n        </tr>\n        <tr>\n            <th>url</th>\n            <th>string | object</th>\n            <th>it represents absolute address or relative address of PDF files.</th>\n        </tr>\n        <tr>\n            <th>page</th>\n            <th>number</th>\n            <th>default value is 1 ,decides that which page to show in PDF file.</th>\n        </tr>\n        <tr>\n            <th>scale</th>\n            <th>'auto' | number</th>\n            <th>defaut value is 'auto', react-react-pdf use pdfjs-viewer,so if the scale is 'auto' , it can Adaptive mobile device .This property decides the viewport in render</th>\n        </tr>\n        <tr>\n            <th>minScale</th>\n            <th>number</th>\n            <th>defaut value is 0.25,  decides the minimum value of scale</th>\n        </tr>\n        <tr>\n            <th>maxScale</th>\n            <th>number</th>\n            <th>defaut value is 10,  decides the max value of scale</th>\n        </tr>\n        <tr>\n            <th>isShowHeader</th>\n            <th>boolean</th>\n            <th>defaut value is true, in order to show lively example.'react-react-pdf' added default style to  special header, you can remove this style ,if you change this value to false</th>\n        </tr>\n        <tr>\n            <th>isShowFooter</th>\n            <th>boolean</th>\n            <th>defaut value is true, in order to show lively example.'react-react-pdf' added default style to  special footer, you can remove this style ,if you change this value to false</th>\n        </tr>\n        <tr>\n            <th>onDocumentComplete</th>\n            <th>function</th>\n            <th>after load the PDF file, in this function ,you can get some informations of the PDF file you can see this <a href=\"#function2\">function type</a> for details</th>\n        </tr>\n    </table>\n\n<a name=\"function2\"><b>onDocumentComplete</b></a> \nthe onDocumentComplete property of ***MobilePDFReader***\n\nType: \n\n - function(totalPage,title,otherObj)\n\nProperties:\n Property Name| type |Description\n--- | --- | ---\ntotalPage | number | the totalPage of the PDF file\ntitle | title | the title of the PDF file\notherObj | object | other coding information of the PDF file\n\n#### Notes\n\nI strongly recommend you to set initial value of scale is 'auto',the default is 'auto' too\n","readmeFilename":"README.md"}