Socket
Book a DemoInstallSign in
Socket

srv-to-pdf

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

srv-to-pdf

Microservice to convert HTML with embedded or served css to pdf using webkitToPDF

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

To PDF NPM version Build Status Dependency Status Coverage percentage

Microservice to convert HTML with embedded or served css to pdf using webkitToPDF

This accepts html files with embedded CSS and returns PDF documents utilizing the wkhtmltopdf command line tool.

Installation

There are two ways to install: as a module or a microserver.

1. As submodule

npm install --save srv-to-pdf

2. As microservice

git clone http://github.com/uci-soe/to-pdf
cd to-pdf
npm start

Dependancies

This module requires a locally installed version of wkhtmltopdf. I presently have

$ wkhtmltopdf --version
Name:
  wkhtmltopdf 0.10.0 rc2

License:
  Copyright (C) 2010 wkhtmltopdf/wkhtmltoimage Authors.

Running Microservice with PM2

PM2 is recommended. Here is an example pm2.json

{
  "name"        : "to-pdf",
  "script"      : "bin/www.js",
  "args"        : [],
  "watch"       : true,
  "node_args"   : "",
  "cwd"         : "/root/path/to/to-pdf",
  "env": {
    "NODE_ENV": "production",
    "PORT": "6000",
    "NODE_DEBUG": "",
    "CMD_PATH": "/path/to/bin/wkhtmltopdf"
  }
}

More pm2.json documentation available here

Usage

/* Add usage for submodule */
/* Add usage for microservice */

License

BSD-3-Clause - LICENSE

Keywords

html

FAQs

Package last updated on 11 Aug 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.