/pdf-draw

Primary LanguageTypeScript

pdfgo.js

A drop-in PDF annotator and markups for the browser.

image

usage

Import the CSS:

@import "pdfgo/dist/style.css";

In JS/TS:

import PDFGo from "pdfgo";

const div = document.querySelector("#app");
const pdfgo = new PDFGo(div);

// Load a PDF
const file = new Uint8Array(...);
const name = "edited.pdf";
await pdfgo.loadFile(file, name);

// Download the PDF
await pdfgo.downloadPdf();

// ...or get the bytes
const bytes = await pdfgo.savePdf();

// Destroy the annotator when done
pdfgo.destroy();

todo

  • remove experimental/unused code
  • support for changing colors (not necessarily GUI)
  • improve enable/disable/toggle behavior of measurements toolbar button

resources