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

pdf-maker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf-maker

easy pdf generation using phantom.js

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

pdf-maker

An easy way to generate pdf files from ejs templates or html files

##Install

npm i --save pdf-maker

##Usage

##For generating pdf from ejs templates

var pdfMaker = require('pdf-maker');

var template = 'path/to/ejsTemplate.ejs';
var data = {
    name: 'node.js'
};
var pdfPath = '/path/of/pdf/file.pdf';
var option = {
    {
        paperSize: {
            format: 'A4',
            orientation: 'portrait',
            border: '1.8cm'
        }
    };
};

pdfMaker(template, data, pdfPath, option);

Here, 'option' parameter is optional. 'data' is the data which will be used in the ejs template. 'pdfPath' is the path with where the pdf file will be saved.

##For generating pdf from html files.

var pdfMaker = require('pdf-maker');

var template = 'path/to/htmlFile.html';
var pdfPath = '/path/of/pdf/file.pdf';
var option = {
    {
        paperSize: {
            format: 'A4',
            orientation: 'portrait',
            border: '1.8cm'
        }
    };
};

pdfMaker(template, pdfPath, option);

##Roadmap

Adding test cases. Removing external dependencies.

Keywords

FAQs

Package last updated on 23 Mar 2017

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