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

unlock-pdf

v0.0.1

Published

Remove passwords from PDF files

Readme

unlock-pdf

A powerful command-line tool for removing password protection from PDF files.

unlock-pdf-overview

Features

  • Remove passwords from password-protected PDF files
  • Interactive CLI with file browser
  • Automatic dependency detection and installation
  • Cross-platform support (Linux, macOS, Windows)
  • Comprehensive error handling
  • Preserves PDF quality and text selectability

Prerequisites

This tool requires qpdf to be installed on your system. The CLI will automatically detect if qpdf is missing and offer to install it for you using your system's package manager.

Manual Installation of qpdf

If you prefer to install qpdf manually:

Linux (Debian/Ubuntu):

sudo apt-get install qpdf

macOS (Homebrew):

brew install qpdf

Windows (Chocolatey):

choco install qpdf

Windows (winget):

winget install qpdf.qpdf

For more installation options, visit: https://qpdf.readthedocs.io/en/stable/installation.html

Installation

Install globally to use the command-line tool:

npm install -g unlock-pdf

Or with pnpm:

pnpm add -g unlock-pdf

Usage

Command Line Interface

Interactive Mode

Simply run the command without arguments for an interactive experience:

unlock-pdf

This will:

  1. Open an interactive file browser to select your PDF
  2. Check if the PDF is password-protected
  3. Prompt for the password
  4. Ask for the output file path (with a default suggestion)
  5. Unlock the PDF and save it

Non-Interactive Mode

Provide all arguments directly:

unlock-pdf <input-file> <password> [options]

Examples:

# Unlock a PDF with default output name
unlock-pdf document.pdf myPassword123

# Specify custom output path
unlock-pdf document.pdf myPassword123 -o unlocked.pdf

# Using full paths
unlock-pdf /path/to/document.pdf myPassword123 -o /path/to/output.pdf

Options

  • -o, --output <path> - Specify the output file path (default: adds "_unlocked" suffix to input filename)
  • --skip-dependency-check - Skip the qpdf dependency check (not recommended)
  • -V, --version - Output the version number
  • -h, --help - Display help information

How It Works

This tool uses qpdf, a powerful command-line program for PDF manipulation. When you provide a password-protected PDF:

  1. The tool validates the input file
  2. Checks if the PDF is password-protected
  3. Uses qpdf with the provided password to decrypt the PDF
  4. Saves the unlocked PDF to the specified output path

The original PDF quality, formatting, and text selectability are preserved.