ibill

This library provides the official js access to ibill teamplate engine

this package has been deprecated
Last updated a year ago by ericfong .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ibill 
SYNC missed versions from official npm registry.

ibill

https://img.shields.io/npm/v/ibill.svg state npm npm

** render PDF templates that your customers can edit via https://ibill.today server **

Features

  • Support offline mode, in which, still can render even ibill.today server is down (template should be cached)
  • Your (multi-tenancy) customers can use our self-serve editor to edit, upload image and preview template
  • Support browser PDF rendering
  • based on pdfmake and pdfkit

Usage

CLI server

npm install --global ibill
ibill

example node.js server

import http from 'http'
import { renderPdf } from 'ibill'

http.createServer((req, res) => {
  renderPdf({
    templateId: 'my-template-id',
    data,
  }).then(pdfStream => {
    res.statusCode = 200
    res.setHeader('Content-Type', 'application/pdf')
    pdfStream.pipe(res)
  })
}).listen(8899, '0.0.0.0')

example koa server

import Koa from 'koa'
import { renderPdf } from 'ibill'

const app = new Koa()
app.use(async ctx => {
  const pdfStream = await renderPdf({ templateId: 'my-template-id', data })
  ctx.type = 'application/pdf'
  ctx.body = pdfStream
})

app.listen(8899, '0.0.0.0')

Current Tags

  • 0.6.11                                ...           latest (a year ago)

20 Versions

  • 0.6.11 [deprecated]           ...           a year ago
  • 0.6.10                                ...           a year ago
  • 0.6.9                                ...           a year ago
  • 0.6.8                                ...           a year ago
  • 0.6.6                                ...           a year ago
  • 0.6.5                                ...           a year ago
  • 0.6.4                                ...           a year ago
  • 0.6.3                                ...           a year ago
  • 0.6.2                                ...           a year ago
  • 0.6.1                                ...           a year ago
  • 0.5.0                                ...           a year ago
  • 0.4.1                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.3.5                                ...           a year ago
  • 0.3.3                                ...           a year ago
  • 0.3.2                                ...           a year ago
  • 0.3.1                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 20
Last Day 0
Last Week 0
Last Month 0
Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |