How To Guide#

The code samples in this “How To Guide” assume that you are working with Node.js in the root folder of your project and you have Installed MuPDF.js via NPM.

Node.js is a runtime environment which allows you to run JavaScript outside the of the web browser. It is commonly used for server-side JavaScript solutions and RESTful APIs.

Additionally the following requirements should be defined in your TypeScript / JavaScript file header:

import * as fs from "fs"
import * as mupdfjs from "mupdf/mupdfjs"

Migrating from mupdf-js