{"id":23456427,"url":"https://github.com/kunder-lab/kunder-pdf-viewer","last_synced_at":"2025-04-11T05:57:30.418Z","repository":{"id":58230675,"uuid":"58741078","full_name":"kunder-lab/kunder-pdf-viewer","owner":"kunder-lab","description":"Bower plugin for viewing PDFs in ionic apps","archived":false,"fork":false,"pushed_at":"2018-10-23T20:01:57.000Z","size":357,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-11T05:57:27.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kunder-lab.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-13T13:02:27.000Z","updated_at":"2018-10-23T20:01:08.000Z","dependencies_parsed_at":"2022-08-31T01:01:46.442Z","dependency_job_id":null,"html_url":"https://github.com/kunder-lab/kunder-pdf-viewer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunder-lab%2Fkunder-pdf-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunder-lab%2Fkunder-pdf-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunder-lab%2Fkunder-pdf-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunder-lab%2Fkunder-pdf-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kunder-lab","download_url":"https://codeload.github.com/kunder-lab/kunder-pdf-viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351406,"owners_count":21089271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-24T04:31:22.130Z","updated_at":"2025-04-11T05:57:30.400Z","avatar_url":"https://github.com/kunder-lab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kunder-pdf-viewer\n\n## About\nkunder-pdf viewer is an angular directive that uses [PDF.js](https://github.com/mozilla/pdf.js) to show PDF files inside your ionic app. It transforms\nthe PDF data (a String in base64) to images and then adds them dinamically inside a custom div. It has zoom in, zoom out and scroll\nfunctionalities implemented by default.\n\n## Installation\n1. Install the bower component,a new folder should be created in your /lib.  \n\n`bower install kunder-pdf-viewer` \n \n2. Import the following files to your index.html.\n\n```\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"lib/kunder-pdf-viewer/pdfViewer.min.css\"\u003e    \n\u003cscript src=\"lib/kunder-pdf-viewer/directives/pdfViewer.js\"\u003e\u003c/script\u003e  \n\u003cscript src=\"lib/kunder-pdf-viewer/dependencies/pdf.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"lib/kunder-pdf-viewer/dependencies/pdf.worker.min.js\"\u003e\u003c/script\u003e    \n```  \n3. Include the pdfViewer module as a dependency when defining your angular app.  \n\n``` js\nangular.module('myApp', ['kunder.pdfViewer,...'])\n``` \n\n## Use\n1. Declare the directive in the selected HTML file, here you should define your ideal scale (WARNING: for best performance\nkeep it around 1.0) and the PDF data that should be transformed, be sure to have it as a String and loaded before the directive gets initialized.  \n\n``` html\n\u003cpdf-viewer scale=\"1.0\" pdf-data=\"model.pdfData\"\u003e\u003c/pdf-viewer\u003e  \n```  \n\n## Optionals\nThe directive also accepts \"onScrollBottom\" and \"noScrollBottom\" function parameters. \"onScrollBottom\" is called when the bottom\nend of the PDF is reached. \"noScrollBottom\" gets called after \"onScrollBottom\" is invoked and the user performs another scroll on the document.  \n``` html\n\u003cpdf-viewer onScrollBottom=\"iHitBottom()\n            noScrollBottom=\"iGetCalledAfterTheOtherOne()\" \n            scale=\"1.0\" pdf-data=\"model.pdfData\"\u003e\u003c/pdf-viewer\u003e`           \n```\n\n[Read the license!](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunder-lab%2Fkunder-pdf-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkunder-lab%2Fkunder-pdf-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunder-lab%2Fkunder-pdf-viewer/lists"}