{"_id":"@daniel-fahl/quasar-app-extension-qpdfviewer","_rev":"1-e474c15d90e5412b0986c61ed38bd211","name":"@daniel-fahl/quasar-app-extension-qpdfviewer","dist-tags":{"latest":"2.0.0-alpha.7"},"versions":{"2.0.0-alpha.6":{"name":"@daniel-fahl/quasar-app-extension-qpdfviewer","version":"2.0.0-alpha.6","description":"QPdfviewer is an app extension for viewing PDF files","author":{"name":"Jeff Galbraith","email":"jeff@quasar.dev"},"main":"src/index.js","scripts":{"lint":"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix","build-demo":"cd ./demo && yarn build && cd .. && cp ./_redirects ./demo/dist/spa && rm -r -f ./docs && cp -r ./demo/dist/spa/. ./docs","test":"echo \"No test specified\" && exit 0"},"engines":{"node":">= 8.9.0","npm":">= 5.6.0","yarn":">= 1.6.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/quasarframework/app-extension-qpdfviewer/issues"},"repository":{"type":"git","url":"git+https://github.com/quasarframework/app-extension-qpdfviewer.git"},"homepage":"https://github.com/quasarframework/app-extension-qpdfviewer","license":"MIT","keywords":["quasar","app","app extension","extension","pdf","viewer"],"devDependencies":{"@babel/eslint-parser":"^7.17.0"},"_id":"@daniel-fahl/quasar-app-extension-qpdfviewer@2.0.0-alpha.6","gitHead":"7c55d26a096e9f51ea16d0ae7ea7b2fb2fe1ee71","_nodeVersion":"20.7.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-bdTIt4wO4dFf0MiRviFhjj6LlSiZzFY8gGdCDe1ls6M0t9Z4/md0+1dSTgXrz62WndehiFIEefsb4ymDUMS3kQ==","shasum":"77a728ddf4e9978f3eb7fdce8ff8ac98e06a0cfa","tarball":"https://registry.npmjs.org/@daniel-fahl/quasar-app-extension-qpdfviewer/-/quasar-app-extension-qpdfviewer-2.0.0-alpha.6.tgz","fileCount":373,"unpackedSize":14571690,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVBQ8YtxfyCOxcazTv/hkT+Sbbz2D2Aq2Ub0yrxFL7ngIgWD2eP3tiTo3BMwCIahbven8IRzY/0jwd8wVY72q/atk="}]},"_npmUser":{"name":"daniel-fahl","email":"mail@daniel-fahl.de"},"directories":{},"maintainers":[{"name":"daniel-fahl","email":"mail@daniel-fahl.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quasar-app-extension-qpdfviewer_2.0.0-alpha.6_1696287857377_0.9131319581553914"},"_hasShrinkwrap":false},"2.0.0-alpha.7":{"name":"@daniel-fahl/quasar-app-extension-qpdfviewer","version":"2.0.0-alpha.7","description":"QPdfviewer is an app extension for viewing PDF files","author":{"name":"Jeff Galbraith","email":"jeff@quasar.dev"},"main":"src/index.js","scripts":{"lint":"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix","build-demo":"cd ./demo && yarn build && cd .. && cp ./_redirects ./demo/dist/spa && rm -r -f ./docs && cp -r ./demo/dist/spa/. ./docs","test":"echo \"No test specified\" && exit 0"},"engines":{"node":">= 8.9.0","npm":">= 5.6.0","yarn":">= 1.6.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/quasarframework/app-extension-qpdfviewer/issues"},"repository":{"type":"git","url":"git+https://github.com/quasarframework/app-extension-qpdfviewer.git"},"homepage":"https://github.com/quasarframework/app-extension-qpdfviewer","license":"MIT","keywords":["quasar","app","app extension","extension","pdf","viewer"],"devDependencies":{"@babel/eslint-parser":"^7.17.0"},"_id":"@daniel-fahl/quasar-app-extension-qpdfviewer@2.0.0-alpha.7","gitHead":"7c55d26a096e9f51ea16d0ae7ea7b2fb2fe1ee71","_nodeVersion":"20.7.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-gvdCbTlaT0LfvCIE7IwGaUxb70bFNc0I6l2mSZV/tvSxojLW+NY10nnI7H0rkOAJiXStgTTSbmC8iEJGp08wjw==","shasum":"5ab7143736d4617447e08683eb6ccba558ca2f90","tarball":"https://registry.npmjs.org/@daniel-fahl/quasar-app-extension-qpdfviewer/-/quasar-app-extension-qpdfviewer-2.0.0-alpha.7.tgz","fileCount":373,"unpackedSize":14571705,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAizu5qtQe8V17HcTUtndb6QYS+kHzhZaqqkbkFrH7GKAiEAq2zjHOjoyA3Hic9fHsNd0jgmGMR8RAZ5oMTYo1IyjTo="}]},"_npmUser":{"name":"daniel-fahl","email":"mail@daniel-fahl.de"},"directories":{},"maintainers":[{"name":"daniel-fahl","email":"mail@daniel-fahl.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quasar-app-extension-qpdfviewer_2.0.0-alpha.7_1696289554272_0.9365148094409246"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-02T23:04:17.286Z","2.0.0-alpha.6":"2023-10-02T23:04:17.756Z","modified":"2023-10-02T23:32:34.893Z","2.0.0-alpha.7":"2023-10-02T23:32:34.711Z"},"maintainers":[{"name":"daniel-fahl","email":"mail@daniel-fahl.de"}],"description":"QPdfviewer is an app extension for viewing PDF files","homepage":"https://github.com/quasarframework/app-extension-qpdfviewer","keywords":["quasar","app","app extension","extension","pdf","viewer"],"repository":{"type":"git","url":"git+https://github.com/quasarframework/app-extension-qpdfviewer.git"},"author":{"name":"Jeff Galbraith","email":"jeff@quasar.dev"},"bugs":{"url":"https://github.com/quasarframework/app-extension-qpdfviewer/issues"},"license":"MIT","readme":"QPdfViewer (@quasar/qpdfviewer)\n===\n\n![npm (scoped)](https://img.shields.io/npm/v/@quasar/quasar-app-extension-qpdfviewer@next?style=plastic)\n[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/quasarframework/app-extension-qpdfviewer.svg)]()\n[![GitHub repo size in bytes](https://img.shields.io/github/repo-size/quasarframework/app-extension-qpdfviewer.svg)]()\n[![npm](https://img.shields.io/npm/dt/@quasar/quasar-app-extension-qpdfviewer.svg)](https://www.npmjs.com/package/@quasar/quasar-app-extension-qpdfviewer)\n\nQPdfViewer is an `UI App Extension` for [Quasar Framework v1](https://v1.quasar-framework.org/). It will not work with legacy versions of Quasar Framework.\n\nThis work is currently in `beta` and there are expected changes while things get worked out. Your help with testing is greatly appreciated. Suggestions and PRs welcomed.\n\n# Info\nQPdfViewer allows you to have PDF in your web pages.\n\n# Install\nTo add this App Extension to your Quasar application, run the following (in your Quasar app folder):\n```\nquasar ext add @quasar/qpdfviewer@next\n```\n\n# Uninstall\nTo remove this App Extension from your Quasar application, run the following (in your Quasar app folder):\n```\nquasar ext remove @quasar/qpdfviewer\n```\n\n# Describe\nYou can use `quasar describe QPdfViewer`\n\n# Test Project\nIn **demo** folder of **app-extension-qpdfviewer**.\n\n# Docs and Demo\nCan be found [here](https://qpdfviewer.netlify.app/)\n\n# Example Code\nBe sure to check out the Test Project for more examples.\n\n```html\n<q-pdfviewer\n  src=\"'https://www.ets.org/Media/Tests/GRE/pdf/gre_research_validity_data.pdf'\"\n  type=\"pdfjs\"\n  content-class=\"absolute\"\n/>\n\nor\n\n<template>\n  <div class=\"container q-pa-lg\">\n    <q-pdfviewer\n      :src=\"src\"\n      type=\"html5\"\n      content-class=\"fit container\"\n      inner-content-class=\"fit container\"\n    />\n  </div>\n</template>\n\n<script>\nexport default {\n  name: 'Container',\n  props: {\n    src: String\n  }\n}\n</script>\n\n<style>\n.container {\n  max-width: 50%;\n  max-height: 70%;\n  min-width: 400px;\n  min-height: 600px;\n  width: 100%;\n  height: 100%;\n}\n</style>\n\n```\n\nUsing blob data (for `type=\"html5\"` only):\n\n```js\nfetchPDF (payload) {\n  axios.post('/my/url/to/pdf', payload, { responseType: 'blob' })\n    .then(res => {\n      // create the blob\n      const blob = new Blob([res.data], { type: res.data.type })\n      // set reactive variable\n      pdfSrc = window.URL.createObjectURL(blob)\n    })\n    .catch(err => {\n      $q.notify({\n        message: 'Error downloading PDF',\n        type: 'negative',\n        textColor: 'white',\n        color: 'negative',\n        icon: 'error',\n        closeBtn: 'close',\n        position: 'top'\n      })\n    })\n}\n```\n\n---\nNOTE:\n  QPdfviewer now has support for native HTML5 PDF viewer and for PDFJS. Use `type=\"html5\"` or `type=\"pdfjs\"`. If you previously had this app extension, and want to use the pdfjs, you will need to re-install it. An update will not get the PDFJS for you. If you update, you can run `quasar ext invoke @quasar/qpdfviewer` instead of re-installing.\n\n---\nNOTE:\n  QPdfviewer uses the `<object>` tag for displaying the PDF (`type=\"html5\"` only). Should the browser not support this, the fallback is to use an `<iframe>`. And, should this also not be supported by the browser, then some text will be displayed with a link to the PDF so the user can download it for off-line viewing.\n\n  When using PDFJS, the PDF is always displayed in an `<iframe>`.\n\n---\nNOTE:\n  QPdfviewer now works with Electron, but you have to use `type=\"pdfjs\"` to get this functionality.\n\n---\n\n# QPdfviewer Vue Properties\n| Vue&nbsp;Property | Type\t| Description |\n|---|---|---|\n| src | String | Path to the PDF source |\n| type | String | PDF engine to use (values: `html5` or `pdfjs`) |\n| error-string | String | Set this if you wish to change from the default error string |\n| load | Function | The function to be called when the pdf document has been loaded |\n| error | Function | The function to be called when the pdf document has an error |\n| content-class | [String, Object, Array] | Style definitions to be attributed to the PDF container |\n| content-style | [String, Object, Array] | Style definitions to be attributed to the PDF container |\n| inner-content-class | [String, Object, Array] | Style definitions to be attributed to the PDF object |\n| inner-content-style | [String, Object, Array] | Style definitions to be attributed to the PDF object |\n\nQPdfViewer has no events or slots.\n\n# Donate\nIf you appreciate the work that went into this App Extension, please consider [donating to Quasar](https://donate.quasar.dev).\n","readmeFilename":"README.md"}