@protacon/html-to-pdf
Simple tool to convert HTML content to PDF
Last updated 2 years ago by savpek .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @protacon/html-to-pdf 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.1.3                                ...           latest (2 years ago)
  • 1.1.0                                ...           testtag0 (2 years ago)

4 Versions

  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           3 years ago
Downloads
Today 0
This Week 1
This Month 5
Last Day 1
Last Week 2
Last Month 2
Dependencies (15)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |