3.2.1 • Published 2 years ago

@lob/pdffonts v3.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

pdffonts

Build Status Coverage Status

Node bindings for Poppler's pdffonts CLI.

Dependencies

For this module to install and build correctly, you'll need to make sure that poppler is installed on your machine.

To install Poppler on Mac OS X using Homebrew:

brew install poppler

To install Poppler on Ubuntu/Debian:

apt-get install pkg-config
apt-get install libpoppler-private-dev
apt-get install poppler-data

Usage

PDFFonts.fonts()

Returns an array of font objects.
@param {String} path - path to the PDF
@returns {Array<Object>} array of font objects

Here's an example font object:

{
  name: 'LDJWDV+DejaVuSerif-Bold',
  type: 'CID TrueType',
  encoding: 'Identity-H',
  embedded: true,
  subset: true,
  unicode: true,
  object: {
    number: 8,
    generation: 0
  }
}

Testing

$ npm i
$ npm test

Coverage

The coverage report is generated using lcov, so you need to make sure you have it installed:

To install lcov on Mac OS X using Homebrew:

$ brew install lcov

To install lcov on Ubuntu 14.04:

$ apt-get install lcov

Once it's installed, you can generate a coverage.info file by running:

$ npm run cover

If you want to view it as an HTML file to see which lines haven't been covered, you can run the following to generate a coverage/index.html:

$ npm run cover:html

Linting

$ npm run lint
3.2.1

2 years ago

3.2.0

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.1.0

3 years ago

3.0.0

3 years ago

2.1.0

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.0.1

8 years ago