Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

print-js

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

print-js

A tiny javascript library to help printing from the web.

  • 1.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
113K
decreased by-16.68%
Maintainers
1
Weekly downloads
 
Created

What is print-js?

The print-js npm package is a lightweight JavaScript library that allows you to easily print content from your web pages. It supports printing HTML elements, PDFs, and images, making it a versatile tool for web developers who need to implement printing functionality in their applications.

What are print-js's main functionalities?

Print HTML Elements

This feature allows you to print specific HTML elements by providing the element's ID. The 'type' parameter is set to 'html' to indicate that the content to be printed is HTML.

printJS({ printable: 'elementId', type: 'html' });

Print PDF Files

This feature allows you to print PDF files by providing the path to the PDF file. The 'type' parameter is set to 'pdf' to indicate that the content to be printed is a PDF file.

printJS({ printable: 'path/to/pdf/file.pdf', type: 'pdf' });

Print Images

This feature allows you to print images by providing the path to the image file. The 'type' parameter is set to 'image' to indicate that the content to be printed is an image.

printJS({ printable: 'path/to/image.jpg', type: 'image' });

Other packages similar to print-js

Keywords

FAQs

Package last updated on 17 Feb 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc