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

@protacon/html-to-pdf

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@protacon/html-to-pdf

Simple tool to convert HTML content to PDF

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

html-to-pdf

MIT licensed Build Status codecov Dependency Status devDependency Status

What is this?

Simple tool to convert HTML content to PDF

Installation, configure and usage

Preconditions

First of all you have to install npm and node.js to your box - note that NodeJS 6+ is required. See following links to help you with installation:

Installation

First of all you have to install npm and node.js to your box. Installation instructions can be found here.

Note that node.js 6.x is required.

$ git clone https://github.com/ProtaconSolutions/html-to-pdf.git
$ cd html-to-pdf

# install the project's dependencies
$ npm install

# fast install (via Yarn, https://yarnpkg.com)
$ yarn install  # or yarn

Usage

Command line

See help

$ npm run convert
# OR
$ node bin/convert

Creating example file

$ npm run convert -- src/examples/example.html example.pdf --data '{"title": "Awesome", "content": "Lorem ipsum dolor."}'
# OR
$ node bin/convert src/examples/example.html example.pdf --data '{"title": "Awesome", "content": "Lorem ipsum dolor."}'

Web UI

Start server

$ npm start

Then open your http://localhost:3000/ within your favorite browser.

Translators

Translators are way to make embedded dataconversions to templates.

data: { barcode: '[translate:type]value'}
barcode

Translates textual content as barcode. Output is base64 encoded image string.

data: { barcode: '[translate:barcode]AE5C9B'}

Can be embedded to template HTML:

<img src="{{ barcode }}"/>

API

Author

Protacon Solutions Ltd

License

The MIT License (MIT)

Copyright (c) 2017 Protacon Solutions Ltd

Keywords

FAQs

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