Minimal PDF Viewer For Vue 3

A lightweight yet fully configurable PDF viewer component for Vue 3 applications.

How to use it:

1. Install and import the PDF component into your Vue project.

import PDF from "pdf-vue3";

2. Add the PDF component to the app and specify the path to the PDF file.

<template>
  <PDF src="/demo.pdf" />
  <!-- <PDF :src="BASE64" /> -->
  <!-- <PDF :src="Uint8Array" /> -->
</template>

3. Available component props to customize the PDF viewer.

src: string | Uint8Array;
httpHeaders?: Record<string, any>;
withCredentials?: boolean;
password?: string;
useSystemFonts?: boolean;
stopAtErrors?: boolean;
disableFontFace?: boolean;
disableRange?: boolean;
disableStream?: boolean;
disableAutoFetch?: boolean;
// --custom--
showProgress?: boolean;
progressColor?: string;
showPageTooltip?: boolean;
showBackToTopBtn?: boolean;
scrollThreshold?: number;
pdfWidth?: string;
rowGap?: number;

Preview:

Minimal PDF Viewer For Vue 3

Changelog:

v1.0.11 (11/20/2023)

  • add on-page-change

Download Details:

Author: hymhub

Live Demo: https://hymhub.github.io/pdf-vue3/

Download Link: https://github.com/hymhub/pdf-vue3/archive/refs/heads/main.zip

Official Website: https://github.com/hymhub/pdf-vue3

Install & Download:

# NPM
$ npm i pdf-vue3
Tags:

Add Comment