New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pdf-my-url

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf-my-url

A CLI tool to create PDFs from web pages

latest
npmnpm
Version
1.0.0
Version published
Maintainers
0
Created
Source

pdf-my-url

A command-line utility to create PDFs from web pages using Puppeteer.

Installation

You can run this utility directly using npx:

npx pdf-my-url --url <webpage-url> --output <pdf-path>

Example

npx pdf-my-url --url https://www.google.com --output ./google.pdf

Features

  • Captures full-page screenshots
  • Automatically adjusts height to capture entire page content
  • Maintains high-quality output with proper scaling
  • Supports custom viewport width
  • Includes background colors and images in the PDF

Technical Details

The utility uses Puppeteer to launch a headless Chrome browser, navigate to the specified URL, and generate a PDF. It automatically:

  • Sets the initial viewport
  • Waits for the page to load completely
  • Calculates the full height of the page
  • Adjusts the viewport to match the content
  • Generates a high-quality PDF with background elements

Keywords

pdf

FAQs

Package last updated on 28 Oct 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