1.0.0 • Published 6 months ago
pdf-font-extract v1.0.0
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.
1.0.0
6 months ago