just-pdf-viewer
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

logo

Github releaseLicense

中文

What is this

just a beautiful vue3 supported pdf viewer

Usage

Install

npm install just-pdf-viewer

Import

import { createApp } from 'vue'
import JustPdfViewer from 'just-pdf-viewer';
import App from './App.vue';
import 'just-pdf-viewer/es/index.css';

const app = createApp(App);
app.use(JustPdfViewer);
app.mount('#app');

Use in vue

<script setup lang="ts">
import {ref} from "vue";
const downloadable = ref<boolean>(true)
const rotatable = ref<boolean>(true)
const printable = ref<boolean>(true)
const scalable = ref<boolean>(true)
const lazyLoad = ref<boolean>(false)
</script>

<template>
	<just-pdf-viewer src="/test.pdf" width="100vw" height="100vh" :rotatable="rotatable"  :scalable="scalable"  :lazy-load="lazyLoad"/>
</template>

<style scoped>

</style>

API

<just-pdf-viewer> Props

name description type default value version
width Specify viewer's width string -- 1.0.0
height Specify viewer's height string -- 1.0.0
src Specify viewer's pdf resource src string | URL | TypedArray | ArrayBuffer | DocumentInitParameters -- 1.0.0
rotatable Specify whether it can rotate boolean true 1.0.0
scalable Specify whether it can scale boolean true 1.0.0
lazy-load Specify whether it renders all or not boolean true 1.0.0

DocumentInitParameters@see#getDocument

Live Example

https://just.pdf.viewer.sdefaa.com

Readme

Keywords

Package Sidebar

Install

npm i just-pdf-viewer

Weekly Downloads

3

Version

1.0.1

License

Apache-2.0

Unpacked Size

3.8 MB

Total Files

12

Last publish

Collaborators

  • sdefaa