{"id":19738689,"url":"https://github.com/vue-pdf-viewer/starter-vpv-composition-js","last_synced_at":"2026-01-25T15:03:13.354Z","repository":{"id":248962545,"uuid":"823647008","full_name":"vue-pdf-viewer/starter-vpv-composition-js","owner":"vue-pdf-viewer","description":"Vue PDF Viewer Starter toolkit with Composition API ","archived":false,"fork":false,"pushed_at":"2025-09-15T08:03:22.000Z","size":848,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T00:44:45.328Z","etag":null,"topics":["composition-api","javascript","pdf-viewer","pdfjs","pdfjs-dist","vue","vue-pdf","vue-pdf-viewer","vue3"],"latest_commit_sha":null,"homepage":"https://vue-pdf-viewer.dev","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vue-pdf-viewer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-03T12:39:11.000Z","updated_at":"2025-09-15T08:03:26.000Z","dependencies_parsed_at":"2024-07-18T05:47:48.032Z","dependency_job_id":"d7259477-5afa-4e63-a19f-00141d2fb14d","html_url":"https://github.com/vue-pdf-viewer/starter-vpv-composition-js","commit_stats":null,"previous_names":["vue-pdf-viewer/starter-vpv-composition-js"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/vue-pdf-viewer/starter-vpv-composition-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vue-pdf-viewer%2Fstarter-vpv-composition-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vue-pdf-viewer%2Fstarter-vpv-composition-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vue-pdf-viewer%2Fstarter-vpv-composition-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vue-pdf-viewer%2Fstarter-vpv-composition-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vue-pdf-viewer","download_url":"https://codeload.github.com/vue-pdf-viewer/starter-vpv-composition-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vue-pdf-viewer%2Fstarter-vpv-composition-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28754807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T13:59:49.818Z","status":"ssl_error","status_checked_at":"2026-01-25T13:59:33.728Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["composition-api","javascript","pdf-viewer","pdfjs","pdfjs-dist","vue","vue-pdf","vue-pdf-viewer","vue3"],"created_at":"2024-11-12T01:14:57.056Z","updated_at":"2026-01-25T15:03:13.341Z","avatar_url":"https://github.com/vue-pdf-viewer.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue PDF Viewer Starter Toolkit in Vue 3 + Composition API\n\n[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/vue-pdf-viewer/starter-vpv-composition-js)\n\nWelcome to the Vue PDF Viewer starter toolkit! This repository provides a comprehensive guide on how to use Vue PDF Viewer with Vue 3 via the Composition API. This repo showcases how Vue PDF Viewer can be integrated and rendered as part of a Vue.js project.\n\n## Table of Contents\n\n- [Usage](#usage)\n  - [Project Setup](#project-setup)\n  - [Running the Example Project](#running-the-example-project)\n- [Examples](#examples)\n\n## Usage\n\n### Project Setup\n\n1. **Clone the Repository**: If you haven't already, clone the repository and navigate into the project directory.\n\n   ```bash\n   git clone https://github.com/your-username/starter-vpv-composition-ts.git\n   cd starter-vpv-composition-ts\n   ```\n\n2. **Install Dependencies**: Install the necessary dependencies using npm, yarn, pnpm or bun.\n\n   ```bash\n   npm install\n   # or\n   yarn install\n   # or\n   pnpm install\n   # or\n   bun install\n   ```\n\n_Remark: For `pnpm`, there is a bit more configuration required which can be found [here](https://docs.vue-pdf-viewer.dev/introduction/getting-started.html#install-vue-pdf-viewer)._\n\n### Running the Example Project\n\nThis repository includes an example project to demonstrate Vue PDF Viewer in action:\n\n1. **Start the Development Server**: Use the following command to start the development server\n\n   ```bash\n   npm run dev\n   # or\n   yarn dev\n   # or\n   pnpm run dev\n   # or\n   bun run dev\n   ```\n\n2. **Open in Browser**: Open your browser and navigate to `http://localhost:5173` (or the port specified in your terminal) to see the example project in action\n\n### Using the Vue PDF Viewer Component\n\nOnce the example project is running, you may explore the source code to see how the Vue PDF Viewer component is integrated. Here is a brief overview:\n\n1. **Import the component**: Import the desired Vue PDF Viewer component into your Vue file\n\n   ```vue\n   \u003cscript setup\u003e\n    import { VPdfViewer } from '@vue-pdf-viewer/viewer'\n   \u003c/script\u003e\n   ```\n\n2. **Use the component in the template**: Add the Vue PDF Viewer component to your template section\n\n   ```html\n   \u003ctemplate\u003e\n      \u003cdiv :style=\"{ width: '1028px', height: '700px'}\"\u003e\n        \u003cVPdfViewer\n          src=\"https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf\"\n        /\u003e\n      \u003c/div\u003e\n   \u003c/template\u003e\n   ```\n\n### Using the Vue PDF Viewer Component with Annotation\n\nIn this starter, we provide `src/components/AppPdfViewer.vue` as an example of how to use the annotation features within the viewer. Here’s a brief overview:\n\n1. **Import the component and plugin**: Import the Vue PDF Viewer component along with the annotation plugin into your Vue file.\n\n   ```vue\n   \u003cscript setup\u003e\n    import { VPdfViewer } from '@vue-pdf-viewer/viewer'\n    import VPdfAnnotation from \"@vue-pdf-viewer/annotation\"\n   \u003c/script\u003e\n   ```\n\n2. **Use the component with the plugin in your template**: Add the Vue PDF Viewer component to the template and pass the annotation plugin through the `plugins` prop.\n\n   ```html\n   \u003ctemplate\u003e\n      \u003cdiv :style=\"{ width: '1028px', height: '700px'}\"\u003e\n        \u003cVPdfViewer\n          src=\"https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf\"\n          :plugins=\"[VPdfAnnotation()]\"\n        /\u003e\n      \u003c/div\u003e\n   \u003c/template\u003e\n   ```\n\n## Examples\n\nFor more examples, please refer to the `src/App.vue` file in this repository:\n\n- Default Toolbar\n- Without Toolbar\n- Mobile View\n- Default Toolbar with Annotation\n\n_Remark: If you would like more examples, feel free to open an issue._\n\nFor more configurations, please check the [documentation](https://docs.vue-pdf-viewer.dev) site.\n\n## Meta\n\n- Homepage: [https://www.vue-pdf-viewer.dev](https://www.vue-pdf-viewer.dev)\n- Docs: [https://docs.vue-pdf-viewer.dev](https://docs.vue-pdf-viewer.dev)\n\n---\n\nThank you for using Vue PDF Viewer! We hope this toolkit helps you build amazing Vue 3 applications. If you have any questions or need further assistance on this example, please feel free to open an issue. Happy coding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvue-pdf-viewer%2Fstarter-vpv-composition-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvue-pdf-viewer%2Fstarter-vpv-composition-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvue-pdf-viewer%2Fstarter-vpv-composition-js/lists"}