Gathering detailed insights and metrics for afpp
Gathering detailed insights and metrics for afpp
Gathering detailed insights and metrics for afpp
Gathering detailed insights and metrics for afpp
Because we all needed just one more way to deal with PDFs. Fast, efficient, minimal. Zero bloat, one dependency. Because we all needed another f*cking pdf parser.
npm install afpp
Typescript
Module System
Min. Node Version
Node Version
NPM Version
67.9
Supply Chain
94.3
Quality
93.1
Maintenance
100
Vulnerability
99.3
License
TypeScript (91.82%)
JavaScript (7.58%)
Shell (0.6%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
65 Commits
1 Watchers
9 Branches
1 Contributors
Updated on May 21, 2025
Minified
Minified + Gzipped
Latest Version
2.1.0
Package Id
afpp@2.1.0
Unpacked Size
27.37 kB
Size
7.57 kB
File Count
18
NPM Version
10.9.2
Node Version
22.15.0
Published on
May 21, 2025
Cumulative downloads
Total Downloads
2
21
Another f*cking PDF parser. Because parsing PDFs in Node.js should be easy. Live long and parse PDFs. 🖖
There are plenty of PDF-related packages for Node.js. They work… until they don’t.
Afpp was built to solve the headaches I ran into while trying to parse PDFs in Node.js:
You can install afpp
via npm, Yarn, or pnpm.
1npm install afpp
1yarn add afpp
1pnpm add afpp
The afpp
library makes it simple to extract text or images from PDF files in Node.js. Whether your PDF is stored locally, hosted online, or encrypted, afpp
provides an easy-to-use API to handle it all. All functions have common parameters and accepts string path, buffer, or URL object.
1import { readFile } from 'fs/promises'; 2import path from 'path'; 3 4import { pdf2string } from 'afpp'; 5 6(async function main() { 7 const pathToFile = path.join('..', 'test', 'example.pdf'); 8 const input = await readFile(pathToFile); 9 const data = await pdf2string(input); 10 11 console.log('Extracted text:', data); // ['page 1 content', 'page 2 content', ...] 12})();
1import { pdf2image } from 'afpp'; 2 3(async function main() { 4 const url = new URL('https://pdfobject.com/pdf/sample.pdf'); 5 const arrayOfImages = await pdf2image(url); 6 7 console.log(arrayOfImages); // [imageBuffer, imageBuffer, ...] 8})();
1import { parsePdf } from 'afpp'; 2 3(async function main() { 4 // Download PDF from URL 5 const response = await fetch('https://pdfobject.com/pdf/sample.pdf'); 6 const buffer = Buffer.from(await response.arrayBuffer()); 7 8 // Parse the PDF buffer 9 const result = await parsePdf(buffer, {}, (content) => content); 10 console.log('Parsed PDF:', result); 11})();
No vulnerabilities found.
No security vulnerabilities found.
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year