afpp
TypeScript icon, indicating that this package has built-in type declarations

1.7.0 • Public • Published

afpp

Version codecov Node npm Downloads Repo Size Last Commit

Another f*cking pdf parser. (alpha)

Why?

If you are parsing pdf files in nodejs and you are satisfied with your actual solution, good for you, you don't need this.

But if you’ve encountered one or more of these issues:

  • package size (+30mb)
  • blocking event loop
  • performance issues
  • buggy as shit
  • not working in esm/commonjs
  • old pdfjs-dist as peer dependency
  • no typescript support
  • parsing of encrypted pdf files (password needed)

then you might find this package useful.

Prerequisites

  • Node.js v22.14.0

Getting started

npm install afpp

commonjs:

const { pdf2string } = require('afpp');
const path = require('node:path');

const pathToFile = path.join('example.pdf');

(async function start() {
  const pdfString = await pdf2string(pathToFile);
  console.log(pdfString);
})();

esm:

import { pdf2string } from 'afpp';
import path from 'node:path';

const pathToFile = path.join('example.pdf');

(async function start() {
  const pdfString = await pdf2string(pathToFile);
  console.log(pdfString);
})();

Package Sidebar

Install

npm i afpp

Weekly Downloads

44

Version

1.7.0

License

MIT

Unpacked Size

24.9 kB

Total Files

15

Last publish

Collaborators

  • l2ysho