# @bundled-es-modules/pdfjs-dist

> mirror of pdfjs-dist, bundled and exposed as ES module

Latest version **3.6.172-alpha.1** (published 2023-05-12) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @bundled-es-modules/pdfjs-dist
pnpm add @bundled-es-modules/pdfjs-dist
yarn add @bundled-es-modules/pdfjs-dist
bun add @bundled-es-modules/pdfjs-dist
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.6.172-alpha.1 |
| Published | 2023-05-12 |
| First published | 2018-12-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Rob Resendez |
| Maintainers | passle, d4kmor, bashmish, robrez, jorenbroekema |

## Links

- npm: https://www.npmjs.com/package/@bundled-es-modules/pdfjs-dist
- Repository: https://github.com/bundled-es-modules/pdfjs-dist
- Homepage: https://github.com/bundled-es-modules/pdfjs-dist#readme
- Issues: https://github.com/bundled-es-modules/pdfjs-dist/issues
- npm.io page: https://npm.io/package/@bundled-es-modules/pdfjs-dist

## Recent versions

- 3.6.172-alpha.1 (latest) — 2023-05-12
- 2.16.106 — 2023-05-12
- 2.16.105 — 2023-05-12
- 2.16.105-alpha.2 — 2022-10-18
- 2.16.105-alpha.1 — 2022-10-18
- 2.5.207-rc1 — 2021-01-14
- 2.2.228-alpha1 — 2019-09-20
- 2.1.228-alpha1 — 2019-09-20
- 2.1.266 — 2019-08-21
- 2.1.266-rc — 2019-03-23
- 2.0.943-viewer — 2019-03-01
- 2.0.943-repofix — 2018-12-20
- 2.0.943 — 2018-12-10

## README

# pdfjs-dist

This is a mirror of [pdfjs-dist](https://www.npmjs.com/package/pdfjs-dist), bundled and exposed as an ES module

## Install

```bash
npm install @bundled-es-modules/pdfjs-dist
```

## Use

```js
import pdfjs from "@bundled-es-modules/pdfjs-dist/build/pdf";
import viewer from "@bundled-es-modules/pdfjs-dist/web/pdf_viewer";

pdfjs.GlobalWorkerOptions.workerSrc =
  "@bundled-es-modules/pdfjs-dist/build/pdf.worker.js";

var url = "basicapi.pdf";
var loadingTask = pdfjs.getDocument(url);
//...
```

**Important**: Unlike in the original build, the `pdfjs.GlobalWorkerOptions.workerSrc` is mandatory. We recommend supplying the worker via [CDN](https://www.jsdelivr.com/package/npm/pdfjs-dist).

# Overview

## Structure

```
├── build/
│   ├── pdf.js                    - display layer
│   └── pdf.worker.js             - core layer
|── types/                        - typescript typings
└── web/
    ├── pdf_viewer.js             - top-level viewer import, containing all necessary setup
    ├── module.js                 - pdf-viewer module, transformed from UMD to ESM
    └── util.js                   - utility module for setup
```

### Background

PDFJS is a library by Mozilla, created to facillitate client-side rendering of PDF documents.

Currently, the primary build for this project is provided as UMD-style modules at [pdfjs/pdfjs-dist](https://github.com/mozilla/pdfjs-dist).

_Support for es modules in the main project has been requested [here (#10317)](https://github.com/mozilla/pdf.js/issues/10317)_

### Building

```bash
npm i
npm run build
```

---
_Source: https://npm.io/package/@bundled-es-modules/pdfjs-dist · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
