npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

np-js.pdf

v1.0.12

Published

An npm package to make a fast js-pdf

Readme

Documentation

How to use?

Install

npm i np-js.pdf

Usage

Then you're ready to start making your document:

const { jsPDF } = require("jspdf"); require("jspdf-autotable");

If you want to change the font size, orientation, or units, you can do:

const doc = new jsPDF();

/* ================= HEADER ================= */
doc.setFontSize(16);
doc.setFont("helvetica", "bold");

doc.setFontSize(11);

doc.setDrawColor(22, 160, 133);
doc.setLineWidth(0.5);
doc.line(14, 26, 196, 26);

Running in Node.js const { jsPDF } = require("jspdf"); // will automatically load the node version

📄 Dynamic Grouped PDF Report Generator (Node.js)

A fully dynamic PDF report generator built using Node.js, jsPDF, and jspdf-autotable. This project automatically generates grouped, clean, professional PDF tables from any JSON data without requiring the user to define columns, rows, or grouping logic manually.

🚀 Features

✅ Fully dynamic data support (no fixed schema)

✅ Automatic column detection

✅ Automatic grouping (rowspan) based on first column

✅ Smart duplicate data handling

Same values are hidden in subsequent rows

Margin/padding applied for visual clarity

✅ Professional PDF layout

✅ Pagination, footer, and timestamps

✅ Works with any API / Postman data

🧠 How It Works (Concept)

Accepts any JSON array

Automatically:

Detects columns

Groups rows using the first column

Applies:

Rowspan for grouped values

Margin logic for repeated values

Generates a clean PDF table

Returns a PDF Buffer (ready for API response or file save)

📥 Example Input Data (Postman / API) [ { "name": "Rahul", "subject": "Maths", "marks": 85, "grade": "A" }, { "name": "Rahul", "subject": "Maths", "marks": 85, "grade": "A" }, { "name": "Rahul", "subject": "Science", "marks": 78, "grade": "B" }, { "name": "Ankit", "subject": "Maths", "marks": 92, "grade": "A+" } ]

⚙️ Key Design Decisions

No hardcoded columns No UI dependency (React/HTML not required) Grouping logic handled internally Safe for any unknown dataset Production-ready formatting

🧪 Supported Data Types

Strings Numbers Boolean (converted to string) Missing fields handled gracefully

❗ Notes & Best Practices

First column is always treated as grouping key Data should be an array of objects Sorting is handled automatically Suitable for: Reports Invoices Marksheets Admin dashboards Exports

Purpose: Reusable, scalable, dynamic PDF reporting solution

📌 Import const StudentReportService = require("dynamic-grouped-pdf-report");

⚡ Quick Usage const data = [ { name: "Rahul", subject: "Maths", marks: 85, grade: "A" }, { name: "Rahul", subject: "Science", marks: 78, grade: "B" }, { name: "Ankit", subject: "Maths", marks: 92, grade: "A+" } ];

StudentReportService.saveToFile(data, "report.pdf");