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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@jsreport/jsreport-chrome-pdf

v4.1.0

Published

jsreport recipe which is rendering pdf from html using headless chrome

Downloads

15,994

Readme

@jsreport/jsreport-chrome-pdf

NPM Version

jsreport recipe which is rendering pdf and images from html using headless chrome

See the docs

  • https://jsreport.net/learn/chrome-pdf
  • https://jsreport.net/learn/chrome-image

Usage

To use recipe in for template rendering set template.recipe=chrome-pdf or template.recipe=chrome-image according to your needs in the rendering request.

chrome-pdf

{
  template: { content: '...', recipe: 'chrome-pdf', engine: '...', chrome: { ... } }
}

chrome-image

{
  template: { content: '...', recipe: 'chrome-image', engine: '...', chromeImage: { ... } }
}

Changelog

### 4.1.0

  • save generated pdf chrome as file streams to avoid keeping whole pdf in memory
  • internal changes to support new response.output api

4.0.0

  • update puppeteer to work with chrome 116
  • minimum node.js version is now 18.15.0
  • update studio build against new webpack and babel

3.4.0

  • empty values '' for pdf width, height and other options throw errors on recent versions of puppeteer, we now normalize options and don't pass empty values
  • set explicit launchOptions.headless: old to avoid warnings, for now we use the old headless mode until the new mode gets stable

3.3.0

  • use Studio.openTab with docProp option to open chrome header/footer tabs

3.2.1

  • user level logs now use logger.debug
  • threat timeout errors as weak errors
  • use url.pathToFileURL to avoid problems with space in file paths for windows

3.2.0

  • mark user logs appropriately to the logger

3.1.1

  • changes to enable new trustUserCode option

3.1.1

  • fix not applying the root chrome config

3.0.0-beta.1

Adaptations for the v3 APIs