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

pdf-merger-stamper

v1.1.0

Published

Merge PDFs chronologically and stamp with ACK numbers

Downloads

319

Readme

PDF Merger & Stamper

Merges PDFs chronologically and stamps each with ACK numbers (ACK-001, ACK-002, etc.)

Installation

cd /Users/admin/Scripts/pdf-merger
npm install

Usage

Merge PDFs

node merge-stamp.js merge <input-directory> [output.pdf]

Add page numbers to existing PDF

node merge-stamp.js paginate <file>

Regenerate index from existing PDF

node merge-stamp.js regenerate <file> [output-directory]

Examples

Merge PDFs and save to default location:

node merge-stamp.js merge "/Users/admin/Desktop/EMails for affidavit"

Merge PDFs and specify output:

node merge-stamp.js merge "/Users/admin/Desktop/EMails for affidavit" "acknowledgments.pdf"

Add page numbers to an existing PDF:

node merge-stamp.js paginate "/Users/admin/Desktop/merged-document.pdf"

Regenerate index from a cleaned PDF (after removing pages):

node merge-stamp.js regenerate "/Users/admin/Desktop/cleaned-document.pdf"

Features

  • Reads all PDFs from input directory
  • Sorts chronologically by filename (yyyy_mm_dd format)
  • Stamps every page of each PDF with ACK-001, ACK-002, etc. (not just the first page)
  • Stamp appears at top center, above the email header
  • Merges all PDFs into one final document
  • Preserves all pages from all PDFs
  • Generates index table with columns:
    • Exhibit (ACK-001, ACK-002, etc.)
    • Document (Email from sender to receiver)
    • Date (dd.mm.yyyy format)
    • Page(s) (e.g., 1-4, 5, 6-10)

Output

Three files are generated:

  1. Merged PDF: <input-directory>/ACK-001 - ACK-XXX.pdf
  2. Index PDF: <input-directory>/ACK-001 - ACK-XXX Index.pdf
  3. Index ODT: <input-directory>/ACK-001 - ACK-XXX Index.odt (OpenOffice Writer format)
  4. Statements ODT: <input-directory>/ACK-001 - ACK-XXX Statements.odt (Legal statements)

Or specify custom output (index files will be named automatically):

node merge-stamp.js merge "/path/to/pdfs" "my-affidavit.pdf"
# Creates: my-affidavit.pdf, my-affidavit Index.pdf, and my-affidavit Index.odt

The ODT files can be opened in OpenOffice Writer, LibreOffice Writer, or Microsoft Word for further editing.

Advanced Usage

Workflow for cleaning documents:

  1. Merge documents: node merge-stamp.js merge "/path/to/pdfs"
  2. Clean the merged PDF (remove unwanted pages in a PDF editor)
  3. Add page numbers (if needed): node merge-stamp.js paginate "/path/to/cleaned.pdf"
  4. Regenerate index: node merge-stamp.js regenerate "/path/to/cleaned.pdf"

This workflow allows you to remove pages and then automatically rebuild the index to match the cleaned document. Page numbering is now a separate step that can be applied after cleaning.

Page Numbering Features:

  • The paginate command adds page numbers at the bottom right corner of each page
  • When run multiple times, it will automatically cover existing page numbers with a white background before drawing new ones
  • This prevents overlapping or double page numbers when renumbering cleaned documents