🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

jn-pdf

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jn-pdf

This little command line utility scans pwd and merges all image files sorted by name into a single PDF file.

1.0.14
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

jn-pdf

A command-line utility that scans files in the current directory, sorts them by name, and merges all images into a single PDF file named after the directory.

Installation

You can install jn-pdf globally using npm:

npm i jn-pdf -g

Usage

After installing globally, you can use jn-pdf in any directory containing image files. Navigate to the directory you want to convert and run:

jn-pdf

This will create a PDF file named after the current directory, containing all images sorted by name.

Windows Explorer Integration (Optional)

You can add a context menu option in Windows File Explorer to use jn-pdf directly from the right-click menu.

  • Create a batch script jn-pdf.bat:

    @echo off
    cd /d %1
    jn-pdf
    
  • Save the batch script in a directory included in your system's PATH.

  • Add the following registry entries:

    • Open the Registry Editor (regedit).
    • Navigate to HKEY_CLASSES_ROOT\Directory\Background\shell.
    • Create a new key named jn-pdf.
    • Set the (Default) value to Merge Images to PDF.
    • Under jn-pdf, create a key named command.
    • Set the (Default) value of command to "C:\path\to\jn-pdf.bat" "%V".

Once set up, you can right-click in any folder and select "Merge Images to PDF" to run jn-pdf.

Dependencies

  • pdf-lib for creating PDF files.
  • glob for pattern matching to find image files.
  • commander for handling command-line arguments.
  • canvas for loading images in the Node.js environment.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

PDF

FAQs

Package last updated on 21 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts