Skip to content

Instantly share code, notes, and snippets.

@svnlto
Created June 29, 2017 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svnlto/29167cf1eb8aff5cf4440060e594128b to your computer and use it in GitHub Desktop.
Save svnlto/29167cf1eb8aff5cf4440060e594128b to your computer and use it in GitHub Desktop.

node-j2-pdf-generator

Statements

const pdf = require('@jenius2/j2-pdf-generator');
pdf.generate({
  template: {
    type: 'statement',
    lang: 'en'
  },
  data: [
    account: {},
    transactions: []
  ]
})
.then(pdf => {

/.../

});

Receipt

pdf.generate({
  template: {
    type: 'receipt',
    lang: 'en'
  },
  data: [
    account: {},
    transaction: {}
  ]
})
.then(pdf => {

/.../

});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment