# pdf-phantom

> PhantomJS integration module for NodeJS

Latest version **1.0.1** (published 2023-07-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install pdf-phantom
pnpm add pdf-phantom
yarn add pdf-phantom
bun add pdf-phantom
```

Provides the command `phantom`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-07-17 |
| First published | 2023-07-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 3 |
| Unpacked size | 54.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sayyam Ahmed |
| Maintainers | sayyamahmed |
| Keywords | phantomjs, pdf-phantom, driver |

## Links

- npm: https://www.npmjs.com/package/pdf-phantom
- npm.io page: https://npm.io/package/pdf-phantom

## Dependencies (3)

- [split](https://npm.io/package/split.md) ^1.0.1
- [winston](https://npm.io/package/winston.md) ^3.2.1
- [phantomjs-prebuilt](https://npm.io/package/phantomjs-prebuilt.md) ^2.1.16

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-07-17
- 1.0.0 — 2023-07-17

## README

# Notice
Development on this project has been suspended due to lack of support for PhantomJs. 

phantom - Fast NodeJS API for PhantomJS
========
[![NPM](https://nodei.co/npm/phantom.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/phantom/)

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Linux Build][travis-image]][travis-url]
[![Node Version][node-image]][node-url]


## Super easy to use
```js
const phantom = require('pdf-phantom');

(async function() {
  const instance = await phantom.create();
  const page = await instance.createPage();
  await page.on('onResourceRequested', function(requestData) {
    console.info('Requesting', requestData.url);
  });

  const status = await page.open('https://stackoverflow.com/');
  const content = await page.property('content');
  console.log(content);

  await instance.exit();
})();

```

Using Node v7.9.0+ you can run the above example with `node file.js`

See [examples](examples) folder for more ways to use this module.


## Installation

### Node v6.x and later
Latest version of phantom does **require Node v6.x and later**. You can install with
```bash
$ npm install pdf-phantom --save
```

## Pooling

Creating new phantom instances with `phantom.create()` can be slow. If
you are frequently creating new instances and destroying them, as a
result of HTTP requests for example, it might be worth creating a pool
of instances that are re-used.

See the [phantom-pool](https://github.com/blockai/phantom-pool) module
for more info.

## Tests

  To run the test suite, first install the dependencies, then run `npm test`:

```bash
$ npm install
$ npm test
```

## Contributing

  This package is under development. Pull requests are welcomed. Please make sure tests are added for new functionalities and that your build does pass in TravisCI.

---
_Source: https://npm.io/package/pdf-phantom · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
