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

lambdatest-screenshot-pdf

v1.0.3

Published

Fetch screenshots from LambdaTest, extract them, and generate a PDF.

Readme

LambdaTest Screenshot Downloader & PDF Generator

A CLI tool that:

  • Fetches session screenshots from LambdaTest
  • Downloads the screenshots as a ZIP file
  • Extracts the screenshots in order
  • Generates a PDF from the extracted images

Features

  • ✅ Fetch screenshots dynamically using a session ID
  • ✅ Handles network issues and API failures gracefully
  • ✅ Ensures correct order of screenshots in the final PDF
  • ✅ Cleans up temporary files after execution
  • ✅ Supports PNG, JPG, and JPEG images
  • ✅ Allows specifying an output directory
  • ✅ Secure authentication using AUTH_HEADER
  • ✅ Generates uniquely named files per session (screenshots_<session_id>.pdf)

Installation

To install the CLI globally:

npm install -g lambdatest-screenshot-pdf

To use it locally:

git clone https://github.com/shubhamsinghrathore/lambdatest-screenshot-pdf.git
cd lambdatest-screenshot-pdf
npm install

Usage

Run the command with a valid LambdaTest session ID:

AUTH_HEADER="Basic your_encoded_auth_string" lambdatest-screenshot-pdf <session_id> --output <output_directory>

Example:

AUTH_HEADER="Basic cmF0aG9yZXNodWIyMjpPaTYxUDNxRXgybXprNKcXUyMmtZM1dCdFlXTm5LclZPeVRRQ01RRGdyNTZjVg==" lambdatest-screenshot-pdf 1a80510a-289a-46b7-9f60-da01d108de10 --output ~/Desktop/screenshots

What happens when you run the command?

  1. Fetches the ZIP download URL for the session ID.
  2. Downloads the ZIP file.
  3. Extracts the screenshots into screenshots_<session_id>/.
  4. Generates a uniquely named screenshots_<session_id>.pdf with all images in order.
  5. Cleans up temporary files.

Output

After execution, you will get:

  • screenshots_<session_id>.zip (Downloaded ZIP file)
  • screenshots_<session_id>/ (Extracted images)
  • screenshots_<session_id>.pdf (Final merged PDF file)

Error Handling

This tool handles:

  • 🚨 Invalid session ID → Ensures a valid session is passed.
  • 🚨 Missing AUTH_HEADER → Prevents execution without authentication.
  • 🚨 Network issues → Handles API timeouts and retries.
  • 🚨 Missing ZIP file → Gracefully exits if the file is unavailable.
  • 🚨 Corrupt images → Skips bad images while generating the PDF.
  • 🚨 Invalid output directory → Ensures the specified directory exists.

Dependencies

  • axios - For making HTTP requests.
  • adm-zip - For extracting ZIP files.
  • pdfkit - For creating the PDF.
  • fs-extra - For file system operations.

Development

If you want to modify or contribute:

git clone https://github.com/shubhamsinghrathore/lambdatest-screenshot-pdf.git
cd lambdatest-screenshot-pdf
npm install
npm link  # To use it locally as a CLI command

Then, run:

AUTH_HEADER="Basic your_encoded_auth_string" node index.js <session_id> --output <output_directory>

License

This project is licensed under the MIT License.

Author

SHUBHAM SINGH RATHORE