pdf-font-extract

1.0.0 • Public • Published

Extract embedded fonts from pdf files

PDF.js doesn't have a convenient API to extract the fonts from the pdf. This is a wrapper on top of PDF.js to help with same.

Install

npm install pdf-font-extract

Usage

import extractFonts from 'pdf-font-extract';

const fonts = await extractFonts('./example.pdf');
console.log(fonts);

Notes

  • Types are provided with JSDoc.
  • It's only possible to extract the glyphs that were present in the pdf. Glyphs for characters not found in the pdf will be missing from the font.

Package Sidebar

Install

npm i pdf-font-extract

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

4.73 kB

Total Files

5

Last publish

Collaborators

  • msx47