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

smart-pdf-generator

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smart-pdf-generator

Generate beautiful pdf with Handlebars on NodeJS

  • 1.1.10
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
34
increased by36%
Maintainers
0
Weekly downloads
 
Created
Source

@bsight/smart-pdf-generator

Smart PDF Generator

Installation

$ npm i smart-pdf-generator

Features

  • Export beautiful Handlebars templates to PDF in one command
  • Save PDF to file

Basic usage

const smartPDF = require("smart-pdf-generator");

let people = ["Arthur", "Julie", "Martin"];
let hbsTemplatePath = "./templates/people-list.handlebars";

// =>  Generate PDF
const pdf = smartPDF.generatePDF(hbsTemplatePath, { people });

// =>  Save to file
smartPDF.savePDFToFile(pdf, "./exports/myAwesomePDF.pdf");

It is also possible to use options as a third argument of generatePDF function where you pass everything in a single object. The list of options is listed below.

Options

  • format Format of the exported PDF, A4 by default
  • printBackground Print images that are on the template background or not, true by default

Keywords

FAQs

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

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