rti-lab-pdf-kit-js
v1.0.0
Published
Vanilla js library exporting Pdf viewer using [PDF.js](https://github.com/mozilla/pdf.js).
Readme
Rti Lab Pdf Kit Js
Vanilla js library exporting Pdf viewer using PDF.js.
Table of Contents
Setup
nvm and pnpm are required.
Instal
nvm.Run
nvm iandnpm install -g pnpm.
Development
nvm use
pnpm installDuring development run this command to start dev server with a sample application
pnpm devBuild
This project can build for esm, commonjs,iife, umd targeting es6. Additionally can target es5 (TARGET=es5 pnpm build).
pnpm build-allUsage example
import { PdfViewer } from "../src/index.js";
const container = document.getElementById("app") as HTMLDivElement;
const pdfViewer = new PdfViewer({ container });
pdfViewer.open("<pdf_url>").then(...).catch(...);