{"library":"pdf-viewer-vue","title":"Vue 2 & Vue 3 PDF Viewer Component","description":"The `pdf-viewer-vue` package offers a straightforward Vue component for embedding and displaying PDF documents directly within Vue 2 and Vue 3 applications. It acts as a wrapper around the `vue-pdf` library, which itself leverages Mozilla's PDF.js for rendering PDF content. The current stable version is 0.2.7. This library is designed for developers seeking a basic, easy-to-integrate PDF viewer without the need for extensive customization or advanced interactive features like sophisticated annotations or form filling, which might be found in more comprehensive or commercially backed alternatives. Its release cadence has been infrequent, focusing primarily on maintaining compatibility with Vue versions 2 and 3.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install pdf-viewer-vue"],"cli":null},"imports":["import PdfViewer from 'pdf-viewer-vue';","components: { PdfViewer }"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"<template>\n  <div class=\"pdf-container\">\n    <h2>My Document Viewer</h2>\n    <p>Displaying a sample PDF:</p>\n    <PdfViewer src=\"https://www.africau.edu/images/default/sample.pdf\" style=\"height: 500px; width: 100%;\" />\n    <p>This viewer supports both Vue 2 and Vue 3 applications.</p>\n  </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport PdfViewer from 'pdf-viewer-vue';\n\nexport default defineComponent({\n  name: 'DocumentViewer',\n  components: {\n    PdfViewer,\n  },\n  setup() {\n    // Composition API specific logic can go here\n  },\n});\n</script>\n\n<style scoped>\n.pdf-container {\n  border: 1px solid #eee;\n  padding: 20px;\n  border-radius: 8px;\n  max-width: 800px;\n  margin: 20px auto;\n  box-shadow: 0 2px 12px rgba(0,0,0,0.05);\n}\n</h2 style=\"color: #333;\">\n</style>","lang":"typescript","description":"This quickstart demonstrates how to integrate and display a PDF document using the PdfViewer component in a Vue 3 Composition API setup, with TypeScript.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}