{"_id":"@amaplex-software/ng2-pdf-viewer","_rev":"4-a0955aef729f5ed5d868f5b78fb74605","name":"@amaplex-software/ng2-pdf-viewer","dist-tags":{"latest":"6.3.4"},"versions":{"6.1.1":{"name":"@amaplex-software/ng2-pdf-viewer","version":"6.1.1","description":"Angular 5+ component for rendering PDF","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://vadimdez@github.com/VadimDez/ng2-pdf-viewer.git"},"keywords":["angular","pdf","angular","angular-pdf","angular2-pdf","ng2","ng2-pdf","angular5"],"author":{"name":"Vadym Yatsyuk","email":"vadym.yatsyuk@gmail.com"},"bugs":{"url":"https://github.com/VadimDez/ng2-pdf-viewer/issues"},"homepage":"https://github.com/VadimDez/ng2-pdf-viewer#readme","peerDependencies":{"pdfjs-dist":"^2.2.228","@types/pdfjs-dist":"^2.1.0"},"dependencies":{"@types/pdfjs-dist":"^2.1.0","pdfjs-dist":"^2.2.228","tslib":"^1.10.0"},"$schema":"./node_modules/ng-packagr/package.schema.json","main":"bundles/ng2-pdf-viewer.umd.js","module":"fesm5/ng2-pdf-viewer.js","es2015":"fesm2015/ng2-pdf-viewer.js","esm5":"esm5/ng2-pdf-viewer.js","esm2015":"esm2015/ng2-pdf-viewer.js","fesm5":"fesm5/ng2-pdf-viewer.js","fesm2015":"fesm2015/ng2-pdf-viewer.js","typings":"ng2-pdf-viewer.d.ts","metadata":"ng2-pdf-viewer.metadata.json","sideEffects":false,"_id":"@amaplex-software/ng2-pdf-viewer@6.1.1","_nodeVersion":"13.8.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-BZvGtC4MWY7LlC/hYTLGPE472LQC50pQJsTONFH4X9eea1X68o+6PVZEeSCwpsViiP6dQsoFXqnrBK2/ssL14Q==","shasum":"3a7d5c6daede3f555aaf1012cfb293ab9835462f","tarball":"https://registry.npmjs.org/@amaplex-software/ng2-pdf-viewer/-/ng2-pdf-viewer-6.1.1.tgz","fileCount":27,"unpackedSize":600348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX4PWCRA9TVsSAnZWagAAtVIQAIj0bQXvgd7CaNdhwjG+\na588Hot7EFE0uNVxgXbuTXDhKOM0Y9BG78EjsY5Zr+8vH/1nkj/uMmsVm+fp\nLzR4vZiUZRirBZhjGTbZ99B8JTIWQKcZHDSad9trC68xsFHJde25iXCUns5o\nw41bZC0OWtSolnNOZwsKxLNO5qPzvSE+OsWX6SUwEgIT9uExNKQX77MUEEsD\nEXGvXbcUa+i0JsPeYkoF8RjuT7pdtrP3qKRDRM71HjaN7coPvNE/rbg5SKgv\nuQr/DHfP3MuOR4CUJa9BMn4uy61qsvVdnF76CpJBM46TvpJD5+FevSmZBp5j\nCc9Z/z7NAsXHX72Nmjoy1VY2/RNR9JT9Uyu+/widaOPTxReRMWVXfP0w3O8D\nWY2XiFEA0PgrJlMzbIdW7GX64Ihja15Wb7ra6rLk0a3EBeaYv47+aUklob5p\nzEx1SX6/FZDRtMdc01haU0ZudkKgM+m1Dr54dqkP1yzojGEsGiYIy3Exz60f\nQXWKwv8GRaqzdYDXcEhXZoMNgY9oCYnliyKk2S7nvXn8WmJTxas+Wz1xIZlw\nvKkIa+IBntLA1uTBduqB9RVJxRg5XZ5b4fQ6KNGY1nP6qMRp2v3hSvikJYbe\nqS5igqZiAuY7KIg8J7JkQSONDae6bNMXHaevDuHCBi5OJOAfZJoyaJxPoXhl\nkEf9\r\n=rgEQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6gdbb7PQGO4pkY52PIsBmUunfIQqLoUUFKd3Z4TYhrwIhALGo5Yp2ouG5goJFPbwTrc7VJ83QdHuFkyEvAlWYzfWN"}]},"maintainers":[{"name":"grumpy-cat","email":"thomas.vasbinder@amanote.com"},{"name":"adrien-fery","email":"contact@adrien-fery.com"}],"_npmUser":{"name":"adrien-fery","email":"contact@adrien-fery.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng2-pdf-viewer_6.1.1_1583317973783_0.7507502360573088"},"_hasShrinkwrap":false},"6.3.3":{"name":"@amaplex-software/ng2-pdf-viewer","version":"6.3.3","description":"Angular 5+ component for rendering PDF","license":"MIT","scripts":{"ng":"ng","start":"ng serve","build":"ng build --prod=true","build:stats":"ng build --stats-json","analyze":"webpack-bundle-analyzer dist/stats-es2015.json","test":"ng test --watch false","test:ci":"ng test --watch=false --browsers=ChromeHeadlessCustom","test:w":"ng test","lint":"ng lint","e2e":"ng e2e","packagr":"ng-packagr -p package.json","docs":"ng build --prod --output-path docs --base-href ng2-pdf-viewer && cp ./docs/index.html ./docs/404.html"},"private":false,"repository":{"type":"git","url":"git+https://vadimdez@github.com/VadimDez/ng2-pdf-viewer.git"},"keywords":["angular","pdf","angular","angular-pdf","angular2-pdf","ng2","ng2-pdf","angular5"],"author":{"name":"Vadym Yatsyuk","email":"vadym.yatsyuk@gmail.com"},"bugs":{"url":"https://github.com/VadimDez/ng2-pdf-viewer/issues"},"homepage":"https://github.com/VadimDez/ng2-pdf-viewer#readme","dependencies":{"@types/pdfjs-dist":"^2.1.7","pdfjs-dist":"^2.5.207","tslib":"^1.10.0"},"devDependencies":{"@angular-devkit/build-angular":"~0.900.1","@angular/animations":"^9.0.0","@angular/cdk":"^8.2.1","@angular/cli":"~9.0.1","@angular/common":"~9.0.0","@angular/compiler":"~9.0.0","@angular/compiler-cli":"~9.0.0","@angular/core":"~9.0.0","@angular/forms":"~9.0.0","@angular/language-service":"~9.0.0","@angular/material":"^8.2.1","@angular/platform-browser":"~9.0.0","@angular/platform-browser-dynamic":"~9.0.0","@angular/router":"~9.0.0","@types/jasmine":"~3.5.0","@types/jasminewd2":"~2.0.3","@types/node":"^13.7.2","codelyzer":"^5.1.2","jasmine-core":"~3.5.0","jasmine-spec-reporter":"~5.0.0","karma":"~5.0.0","karma-chrome-launcher":"~3.1.0","karma-coverage-istanbul-reporter":"~3.0.0","karma-jasmine":"~3.1.1","karma-jasmine-html-reporter":"^1.4.0","ng-packagr":"^9.1.2","protractor":"~5.4.0","puppeteer":"^5.5.0","rxjs":"~6.5.3","ts-node":"~8.6.2","tslint":"~5.20.0","typescript":"~3.6.5","webpack-bundle-analyzer":"^3.7.0","zone.js":"~0.10.2"},"$schema":"./node_modules/ng-packagr/package.schema.json","ngPackage":{"lib":{"entryFile":"public_api.ts"},"whitelistedNonPeerDependencies":["@types/pdfjs-dist","pdfjs-dist"]},"gitHead":"a963cdbf67e05f5bb6d43903c597e939742bcdf1","_id":"@amaplex-software/ng2-pdf-viewer@6.3.3","_nodeVersion":"13.8.0","_npmVersion":"6.14.6","dist":{"integrity":"sha512-sb/yOihxvlNioRvYRfygAbdqxc/vRM6IYCuCa5CgdB53FhWSAWIsGfJhwiY5mPogKxugIBcS02HViSuvNzu57g==","shasum":"e296a892a8dcc4aea985104fe27d6a35098a47eb","tarball":"https://registry.npmjs.org/@amaplex-software/ng2-pdf-viewer/-/ng2-pdf-viewer-6.3.3.tgz","fileCount":57,"unpackedSize":1645587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBviUCRA9TVsSAnZWagAAd+gP+wTLfv20p4YBQJWwvAP8\nATh34LnVRdZCoPp/4VJsSMUCxyLe3tvC8UQc0fPclfdbViKNtAF9w4fCOeaC\nNgHxtvPNIJiwlWx8zNQ4UU6sxfhZoXsw5/eU5CpsAY+vbQtWPOhmtYnOOQEX\nOohCXC8rnR5ikr13jqceb5hRF8Lq3PlyMbXBmTzZW92DNtCS4ZKMZFq1jAu+\nlhe4ugY8pWrmlCq0i6KNI1WbRjjtSEY5jCRfiAbb05f0jnJeLaFK1RmJ1gCr\nB6aVecvMGDWGJUhI0oePARxlFxd8Oby3fwxMiAytkNh7VWmC3AOnRxh5i7ln\ngs+uH9ZMa1WmbQi8ib+bacEXUTk/n6wgGrPuywNLfzCQ378tL0LWF/DYHKk5\nbSEj0VLfGkf76csjapRQ0PU4ZVykKXybSoNtV553B18rU9X+l7XNRawsGu/N\nducqPWWQaNWHHysJ4eiSMiww4qVejdOBT/FmntMIkz9E/U/tedUK6KWo0VcE\nXan90uVM6YhceF1UF/yNdizbejKpWSk+KQKv32OlC1TYoM/Bz2WrQuxBVxOy\nbe+96i6UR6/VCP5u2iY5QdRoQKWisXvT7DawTJZnz/cf8njXMESddEwu/0KR\n04ZRgcuA3yHh15LCqeXBukKcHUv3uHnhdPNosn16FLCz14NaQrYZ1ew5WWVk\nceh+\r\n=P9oc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBzJSVaPgVevSdjbSbCP8TgQBxwb4ZMpjiGrdIDvV6wFAiEAzZBwqkr3TGwQlA8oliYlzsyIpPfDKH5yjykzRkvcFEA="}]},"_npmUser":{"name":"adrien-fery","email":"contact@adrien-fery.com"},"directories":{},"maintainers":[{"name":"adrien-fery","email":"contact@adrien-fery.com"},{"name":"grumpy-cat","email":"thomas.vasbinder@amanote.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng2-pdf-viewer_6.3.3_1611069588270_0.4629591283004224"},"_hasShrinkwrap":false},"6.3.4":{"name":"@amaplex-software/ng2-pdf-viewer","version":"6.3.4","description":"Angular 5+ component for rendering PDF","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://vadimdez@github.com/VadimDez/ng2-pdf-viewer.git"},"keywords":["angular","pdf","angular","angular-pdf","angular2-pdf","ng2","ng2-pdf","angular5"],"author":{"name":"Vadym Yatsyuk","email":"vadym.yatsyuk@gmail.com"},"bugs":{"url":"https://github.com/VadimDez/ng2-pdf-viewer/issues"},"homepage":"https://github.com/VadimDez/ng2-pdf-viewer#readme","dependencies":{"@types/pdfjs-dist":"^2.1.7","pdfjs-dist":"^2.5.207","tslib":"^1.10.0"},"$schema":"./node_modules/ng-packagr/package.schema.json","main":"bundles/amaplex-software-ng2-pdf-viewer.umd.js","module":"fesm5/amaplex-software-ng2-pdf-viewer.js","es2015":"fesm2015/amaplex-software-ng2-pdf-viewer.js","esm5":"esm5/amaplex-software-ng2-pdf-viewer.js","esm2015":"esm2015/amaplex-software-ng2-pdf-viewer.js","fesm5":"fesm5/amaplex-software-ng2-pdf-viewer.js","fesm2015":"fesm2015/amaplex-software-ng2-pdf-viewer.js","typings":"amaplex-software-ng2-pdf-viewer.d.ts","metadata":"amaplex-software-ng2-pdf-viewer.metadata.json","sideEffects":false,"_id":"@amaplex-software/ng2-pdf-viewer@6.3.4","_nodeVersion":"13.8.0","_npmVersion":"6.14.6","dist":{"integrity":"sha512-kov9LLTwHzsM+Fv85O2WtzKseYR+nH0lqG0KiMVpD4W9TahBxgUojXZ0Yq/KTDqVrf3sFz2GeZsuMQwyMrS7zg==","shasum":"4c30d347ce93d1e9a404518c6eb91eb535ce7b3d","tarball":"https://registry.npmjs.org/@amaplex-software/ng2-pdf-viewer/-/ng2-pdf-viewer-6.3.4.tgz","fileCount":30,"unpackedSize":630266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBvrnCRA9TVsSAnZWagAAMeMP/2ZK0Hins+JMyLWXcyeu\nY5amWqQ49AfzdCkswdylLqMpq8Q4H7FtFUrKyLCFhsoBoJgDr0bSjy5wLJcD\n6PLrS8y7vup2cqEiaJ8Lycl4a5NnYR4vOJR2BmaBuoKfytRMtAcsaAfaE3C8\nQu0ANTd1YH6kqdWhwnUg15uZEuVYxmh5mjM94mZMqHhNfN0hxfHbJmA6FrXY\nm7/cAhKVNs99uX1IHvzoyq/Dvms+DYKoCQA+LaAlps6bNPZtC/UN2SGTPj3R\nN0d/xoEkY1owk2gBDBzItqTo64uuCNXF2OIJvrKWojRTpo8fIVTZI45WEasA\nt+k+BDLXqUCnBikpuB1yWDIBsLtX5UrZmIQ/TwP4c1SkWoXttH5tLV41QAbK\nubhsI9HpQ0YtyrCbNEhlMI9+y4bDZxoKPANOeX5b3uxdrPtQDjjm5ZYtv1Ip\nlXWtgSJaRznsPETxoqYuu/yMskBUPsdX6VxdTrDsIPtJlttF60WtAr5AvH68\nd7awyCnQR7iGtPI2M5OHAyvSF+mlmYS7zW47pnZnemvr4KOWaZZ/pmS2im9a\nxqnG8KgRrtsJurgytEcQFGdDM/NsXtOy8w2ShJ9euoSJuqd7ZyzjJcQ3RJG+\nFbZc/CTA+11cgz2L2jDO4zN+fC95Dig0MWCxfpCTXSR58lCKIZpN3fO2q50P\nLRNm\r\n=9eQT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDezRljZ53UMNR8t7X5KtgmAhgpR5sevx4N8soQtbDZEAiEAh+W3/dgmynkp4C0+ViNh5aSPxSoYOvmQ+UWrrAvg+Fs="}]},"_npmUser":{"name":"adrien-fery","email":"contact@adrien-fery.com"},"directories":{},"maintainers":[{"name":"adrien-fery","email":"contact@adrien-fery.com"},{"name":"grumpy-cat","email":"thomas.vasbinder@amanote.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng2-pdf-viewer_6.3.4_1611070183160_0.6414442766728528"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-04T10:32:53.732Z","6.1.1":"2020-03-04T10:32:54.207Z","modified":"2024-05-14T19:58:37.446Z","6.3.3":"2021-01-19T15:19:48.508Z","6.3.4":"2021-01-19T15:29:43.351Z"},"maintainers":[{"email":"contact@adrien-fery.com","name":"adrien-fery"}],"description":"Angular 5+ component for rendering PDF","homepage":"https://github.com/VadimDez/ng2-pdf-viewer#readme","keywords":["angular","pdf","angular","angular-pdf","angular2-pdf","ng2","ng2-pdf","angular5"],"repository":{"type":"git","url":"git+https://vadimdez@github.com/VadimDez/ng2-pdf-viewer.git"},"author":{"name":"Vadym Yatsyuk","email":"vadym.yatsyuk@gmail.com"},"bugs":{"url":"https://github.com/VadimDez/ng2-pdf-viewer/issues"},"license":"MIT","readme":"<h1 align=\"center\">Angular 5+ PDF Viewer</h1>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/ng2-pdf-viewer\">\n    <img src=\"https://img.shields.io/npm/dm/ng2-pdf-viewer.svg?style=flat\" alt=\"downloads\">\n  </a>\n  <a href=\"https://badge.fury.io/js/ng2-pdf-viewer\">\n    <img src=\"https://badge.fury.io/js/ng2-pdf-viewer.svg\" alt=\"npm version\">\n  </a>\n  <a href=\"https://david-dm.org/vadimdez/ng2-pdf-viewer\" title=\"dependencies status\">\n    <img src=\"https://david-dm.org/vadimdez/ng2-pdf-viewer/status.svg\"/>\n  </a>\n  <a href=\"https://travis-ci.org/VadimDez/ng2-pdf-viewer\" title=\"test\">\n    <img src=\"https://travis-ci.org/VadimDez/ng2-pdf-viewer.svg?branch=master\"/>\n  </a>\n  <a href=\"https://gitter.im/ngx-pdf-viewer/Lobby\" title=\"Gitter\">\n    <img src=\"https://img.shields.io/gitter/room/nwjs/nw.js.svg\" alt=\"Gitter\"/>\n  </a>\n  <a href=\"https://www.paypal.me/vadimdez\" title=\"Donate to this project using Paypal\">\n    <img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" />\n  </a>\n</p>\n\n> PDF Viewer Component for Angular 5+\n\n### Demo page\n\n[https://vadimdez.github.io/ng2-pdf-viewer/](https://vadimdez.github.io/ng2-pdf-viewer/)\n\n#### Stackblitz Example\n\n[https://stackblitz.com/edit/ng2-pdf-viewer](https://stackblitz.com/edit/ng2-pdf-viewer)\n\n### Blog post\n\n[https://medium.com/@vadimdez/render-pdf-in-angular-4-927e31da9c76](https://medium.com/@vadimdez/render-pdf-in-angular-4-927e31da9c76)\n\n## Overview\n\n* [Install](README.md#install)\n* [Usage](README.md#usage)\n* [Options](README.md#options)\n* [Render local PDF file](README.md#render-local-pdf-file)\n* [Set custom path to the worker](README.md#set-custom-path-to-the-worker)\n* [Search in the PDF](README.md#search-in-the-pdf)\n* [Contribute](README.md#contribute)\n\n## Install\n\n```\nnpm install ng2-pdf-viewer --save\n```\n\n*Note: For angular 4 or less use version `3.0.8`*\n\n## Usage\n\n*In case you're using ```systemjs``` see configuration [here](https://github.com/VadimDez/ng2-pdf-viewer/blob/master/SYSTEMJS.md).*\n\nAdd ```PdfViewerModule``` to your module's ```imports```\n\n```typescript\nimport { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { AppComponent } from './app/app.component';\n\nimport { PdfViewerModule } from 'ng2-pdf-viewer';\n\n@NgModule({\n  imports: [BrowserModule, PdfViewerModule],\n  declarations: [AppComponent],\n  bootstrap: [AppComponent]\n})\n\nclass AppModule {}\n\nplatformBrowserDynamic().bootstrapModule(AppModule);\n```\n\nAnd then use it in your component\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n  selector: 'example-app',\n  template: `\n  <pdf-viewer [src]=\"pdfSrc\"\n              [render-text]=\"true\"\n              style=\"display: block;\"\n  ></pdf-viewer>\n  `\n})\nexport class AppComponent {\n  pdfSrc = \"https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf\";\n}\n```\n\n## Options\n\n* [[src]](#src)\n* [[(page)]](#page)\n* [[stick-to-page]](#stick-to-page)\n* [[external-link-target]](#external-link-target)\n* [[render-text]](#render-text)\n* [[render-text-mode]](#render-text-mode)\n* [[rotation]](#rotation)\n* [[zoom]](#zoom)\n* [[zoom-scale]](#zoom-scale)\n* [[original-size]](#original-size)\n* [[fit-to-page]](#fit-to-page)\n* [[show-all]](#show-all)\n* [[autoresize]](#autoresize)\n* [[c-maps-url]](#c-maps-url)\n* [[show-borders]](#show-borders)\n* [(after-load-complete)](#after-load-complete)\n* [(page-rendered)](#page-rendered)\n* [(text-layer-rendered)](#text-layer-rendered)\n* [(error)](#error)\n* [(on-progress)](#on-progress)\n\n#### [src]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [src] | *string, object, UInt8Array* | Required |\n\nPass pdf location\n\n```\n[src]=\"'https://vadimdez.github.io/ng2-pdf-viewer/pdf-test.pdf'\"\n```\n\nFor more control you can pass options object to ```[src]```. [See other attributes for the object here](https://github.com/mozilla/pdf.js/blob/master/src/display/api.js#L128-L204).\n\nOptions object for loading protected PDF would be:\n\n ```js\n {\n  url: 'https://vadimdez.github.io/ng2-pdf-viewer/pdf-test.pdf',\n  withCredentials: true\n }\n ```\n\n#### [page]\n\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [page] or [(page)] | *number* | *Required* with [show-all]=\"false\" or *Optional* with [show-all]=\"true\" |\n\nPage number\n\n```\n[page]=\"1\"\n```\nsupports two way data binding as well\n```\n[(page)]=\"pageVariable\"\n```\n\nIf you want that the `two way data binding` actually updates your `page` variable on page change/scroll - you have to be sure that you define the height of the container, for example:\n```\npdf-viewer {\n    display: block;\n    height: 100vh;\n}\n```\n\n#### [stick-to-page]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [stick-to-page] | *boolean* | *Optional* |\n\nSticks view to the page. Works in combination with `[show-all]=\"true\"` and `page`.\n\n```\n[stick-to-page]=\"true\"\n```\n\n#### [render-text]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [render-text] | *boolean* | *Optional* |\n\nEnable text rendering, allows to select text\n```\n[render-text]=\"true\"\n```\n\n#### [render-text-mode]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [render-text-mode] | *RenderTextMode* | *Optional* |\n\nUsed in combination with `[render-text]=\"true\"`\n\nControls if the text layer is enabled, and the selection mode that is used.\n\n`0 = RenderTextMode.DISABLED.` - disable the text selection layer\n\n`1 = RenderTextMode.ENABLED.` - enables the text selection layer\n\n`2 = RenderTextMode.ENHANCED` - enables enhanced text selection\n\n```\n[render-text-mode]=\"1\"\n```\n\n#### [external-link-target]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [external-link-target] | *string* | *Optional* |\n\nUsed in combination with `[render-text]=\"true\"`\n\nLink target\n* `blank`\n* `none`\n* `self`\n* `parent`\n* `top`\n```\n[external-link-target]=\"'blank'\"\n```\n\n#### [rotation]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [rotation] | *number* | *Optional* |\n\nRotate PDF\n\n*Allowed step is 90 degree, ex. 0, 90, 180*\n```\n[rotation]=\"90\"\n```\n\n#### [zoom]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [zoom] | *number* | *Optional* |\n\nZoom pdf\n```\n[zoom]=\"0.5\"\n```\n\n#### [zoom-scale]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [zoom-scale] | *'page-width'\\|'page-fit'\\|'page-height'* | *Optional* |\n\nDefines how the Zoom scale is computed when  `[original-size]=\"false\"`, by default set to 'page-width'.\n\n- *'page-width'* with zoom of 1 will display a page width that take all the possible horizontal space in the container\n\n- *'page-height'* with zoom of 1 will display a page height that take all the possible vertical space in the container\n\n- *'page-fit'* with zoom of 1 will display a page that will be scaled to either width or height to fit completely in the container\n\n```\n[zoom-scale]=\"'page-width'\"\n```\n\n#### [original-size]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [original-size] | *boolean* | *Optional* |\n\n* if set to *true* - size will be as same as original document\n* if set to *false* - size will be as same as container block\n\n```\n[original-size]=\"true\"\n```\n\n#### [fit-to-page]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [fit-to-page] | *boolean* | *Optional* |\n\nWorks in combination with `[original-size]=\"true\"`. You can show your document in original size, and make sure that it's not bigger then container block.\n\n```\n[fit-to-page]=\"false\"\n```\n\n#### [show-all]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [show-all] | *boolean* | *Optional* |\n\nShow single or all pages altogether\n\n```\n[show-all]=\"true\"\n```\n\n#### [autoresize]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [autoresize] | *boolean* | *Optional* |\n\nTurn on or off auto resize.\n\n**!Important** To make `[autoresize]` work - make sure that `[original-size]=\"false\"` and `pdf-viewer` tag has `max-width` or `display` are set.\n\n```\n[autoresize]=\"true\"\n```\n\n#### [c-maps-url]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [c-maps-url] | *string* | Optional |\n\nUrl for non-latin characters source maps.\n```\n[c-maps-url]=\"'assets/cmaps/'\"\n```\n\nDefault url is: [https://unpkg.com/pdfjs-dist@2.0.550/cmaps/](https://unpkg.com/pdfjs-dist@2.0.550/cmaps/)\n\nTo serve cmaps on your own you need to copy ```node_modules/pdfjs-dist/cmaps``` to ```assets/cmaps```.\n\n### [show-borders]\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| [show-borders] | *boolean* | Optional |\n\nShow page borders\n```\n[show-borders]=\"true\"\n```\n\n#### (after-load-complete)\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| (after-load-complete) | *callback* | *Optional* |\n\nGet PDF information with callback\n\nFirst define callback function \"callBackFn\" in your controller,\n```typescript\ncallBackFn(pdf: PDFDocumentProxy) {\n   // do anything with \"pdf\"\n}\n```\n\nAnd then use it in your template:\n```\n(after-load-complete)=\"callBackFn($event)\"\n```\n\n#### (page-rendered)\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| (page-rendered) | *callback* | *Optional* |\n\nGet event when a page is rendered. Called for every page rendered.\n\nDefine callback in your component:\n\n```typescript\npageRendered(e: CustomEvent) {\n  console.log('(page-rendered)', e);\n}\n```\n\nAnd then bind it to `<pdf-viewer>`:\n\n```angular2html\n(page-rendered)=\"pageRendered($event)\"\n```\n\n#### (pages-initialized)\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| (pages-initialized) | *callback* | *Optional* |\n\nGet event when the pages are initialized.\n\nDefine callback in your component:\n\n```typescript\npageInitialized(e: CustomEvent) {\n  console.log('(pages-initialized)', e);\n}\n```\n\nAnd then bind it to `<pdf-viewer>`:\n\n```angular2html\n(pages-initialized)=\"pageInitialized($event)\"\n```\n\n#### (text-layer-rendered)\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| (text-layer-rendered) | *callback* | *Optional* |\n\nGet event when a text layer is rendered.\n\nDefine callback in your component:\n\n```typescript\ntextLayerRendered(e: CustomEvent) {\n  console.log('(text-layer-rendered)', e);\n}\n```\n\nAnd then bind it to `<pdf-viewer>`:\n\n```angular2html\n(text-layer-rendered)=\"textLayerRendered($event)\"\n```\n\n#### (error)\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| (error) | *callback* | *Optional* |\n\nError handling callback\n\nDefine callback in your component's class\n\n```typescript\nonError(error: any) {\n  // do anything\n}\n```\n\nThen add it to `pdf-component` in component's template\n\n```html\n(error)=\"onError($event)\"\n```\n\n#### (on-progress)\n\n| Property | Type | Required |\n| --- | ---- | --- |\n| (on-progress) | *callback* | *Optional* |\n\nLoading progress callback - provides progress information `total` and `loaded` bytes. Is called several times during pdf loading phase.\n\nDefine callback in your component's class\n\n```typescript\nonProgress(progressData: PDFProgressData) {\n  // do anything with progress data. For example progress indicator\n}\n```\n\nThen add it to `pdf-component` in component's template\n\n```html\n(on-progress)=\"onProgress($event)\"\n```\n\n## Render local PDF file\n\nIn your `html` template add `input`:\n\n```html\n<input (change)=\"onFileSelected()\" type=\"file\" id=\"file\">\n```\n\nand then add `onFileSelected` method to your component:\n\n```typescript\nonFileSelected() {\n  let $img: any = document.querySelector('#file');\n\n  if (typeof (FileReader) !== 'undefined') {\n    let reader = new FileReader();\n\n    reader.onload = (e: any) => {\n      this.pdfSrc = e.target.result;\n    };\n\n    reader.readAsArrayBuffer($img.files[0]);\n  }\n}\n```\n\n\n## Set custom path to the worker\n\nBy default the `worker` is loaded from `cdnjs.cloudflare.com`.\n\nIn your code update `path` to the worker to be for example `/pdf.worker.js`\n```typescript\n(window as any).pdfWorkerSrc = '/pdf.worker.js';\n```\n*This should be set before `pdf-viewer` component is rendered.*\n\n\n## Search in the PDF\n\nUse `pdfFindController` for search functionality.\n\nIn your component's ts file:\n\n* Add reference to `pdf-viewer`,\n* then when needed execute search()\n\n```typescript\n@ViewChild(PdfViewerComponent) private pdfComponent: PdfViewerComponent;\n\nsearch(stringToSearch: string) {\n  this.pdfComponent.pdfFindController.executeCommand('find', {\n    caseSensitive: false, findPrevious: undefined, highlightAll: true, phraseSearch: true, query: stringToSearch\n  });\n}\n```\n\n## Contribute\n[See CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Donation\nIf this project help you reduce time to develop, you can give me a cup of tea :)\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.me/vadimdez)\n\n## License\n\n[MIT](https://tldrlegal.com/license/mit-license) © [Vadym Yatsyuk](https://github.com/vadimdez)\n\n","readmeFilename":"README.md"}