Socket
Socket
Sign inDemoInstall

srv-to-pdf

Package Overview
Dependencies
92
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

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


Version published
Maintainers
1
Install size
8.15 MB
Created

Readme

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

FAQs

Last updated on 11 Aug 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc