{"_id":"@antoineschaller/swissqrbill","_rev":"2-fbad7d36ca53e60e16cbdf9cbb411769","name":"@antoineschaller/swissqrbill","dist-tags":{"latest":"2.0.3"},"versions":{"2.0.2":{"name":"@antoineschaller/swissqrbill","version":"2.0.2","description":"Swiss QR Bill generation in Node.js and browsers ","main":"./lib/node","browser":"./lib/browser","scripts":{"test":"tsc && cd tests && sh run.sh","test-windows":"tsc && cd tests && call run-windows.bat","build":"sudo tsc && webpack --mode development"},"repository":{"type":"git","url":"git+https://github.com/Rogerrrrrrrs/SwissQRBill.git"},"keywords":["swiss","switzerland","schweiz","qr","bill","invoice","rechnung"],"author":{"name":"Roger Schönbächler"},"license":"MIT","bugs":{"url":"https://github.com/Rogerrrrrrrs/SwissQRBill/issues"},"homepage":"https://github.com/Rogerrrrrrrs/SwissQRBill#readme","devDependencies":{"@types/iban":"0.0.30","@types/node":"^14.0.0","@types/qrcode":"^1.3.4","@types/qrcode-svg":"^1.1.0","@types/svg-parser":"^2.0.1","@typescript-eslint/eslint-plugin":"^2.24.0","@typescript-eslint/parser":"^2.24.0","@types/blob-stream":"^0.1.30","eslint":"^6.8.0","ts-loader":"^8.0.0","typescript":"^3.9.6","webpack":"^4.43.0","webpack-cli":"^3.3.12"},"dependencies":{"blob-stream":"^0.1.3","iban":"0.0.14","pdfkit":"^0.11.0","qrcode-svg":"^1.1.0","svg-parser":"^2.0.4","svgpath":"^2.2.3"},"directories":{"doc":"doc","example":"examples","lib":"lib","test":"tests"},"gitHead":"d19cd409a818046c617a0151aa8c9f59de1d3a60","_id":"@antoineschaller/swissqrbill@2.0.2","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-D3vhKkUgCA/1wciYs50xXixpkISL1TEkzimxcOak7CHSRj2P9uiC1lsPvRfEIjEItV27KRCNiZ2Chj6LQcE3pA==","shasum":"cbf529292e5a82fc001d0168403dddcffb87594a","tarball":"https://registry.npmjs.org/@antoineschaller/swissqrbill/-/swissqrbill-2.0.2.tgz","fileCount":14,"unpackedSize":126847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPTV4CRA9TVsSAnZWagAAta4P/3XWXpAm7nzNLTCyvGQ2\n+3Au+Jh/3jO1zfddwY2isqisxebE5wBnUm1+Q5bkvK8UbMNDZh5c6yNWHlsj\n2MUGlF3YKB+kPDL56+4m+MC5FQpP6HxUJHeTIoU//JQ+mfMkgnndqJ9viqdA\n6SeIXur7xgbmWDSm8bolX0S8/+5+Yey87vyy+DVFNP5Dg7MiqP35FzpFxgXS\nVudZcfmeehsPQz+ISPK0ohzDyYkkVdQimedLCjLSznYwrWmxpvB4yC9gsCyT\nNn9I81sBxRp2Fx4QIdZTvcFYVdg7OU9xQSlsB3DUh5GyZgefS4i2/CA6dXAD\najvYM02qimpVJyDDzpkQWvM3dBagi2ihbMm31QtQHPrT4ooyqv72mNUMa+mU\ngqfw2BpDs2N9A7s+/V1gQswXJ++XQHB/crmqb1h7EbZ8GoqrGYZ7pbtorq3H\n3KsOLPbfrNaR3OVpMGLnpZQwy8VWGQ60rmZwrmlQGgNy1KYtwEtWQpBk2pmI\nfw/JQAIObTNGxqUG+7sxVKWUfKxr+lk++rI6EINBNeoOh+7Yx+UVyDki+HIN\nM7ivtWRENPDIxYhtTOdTrYoThXjazohmXm3pNJySRJd70koXeGKtYUmFa54j\n0SN6dr93OTYILwPTlFhrUCZfYEdG0xzf83fho5aQG/BUlsdZPnDPhgvNca0a\nq4mn\r\n=ep8/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3fcamOXXEBEn28D/T0iXj/zqD9Z0EUpCGM3rPNFrfNQIhALDS0XNTeaJ5P+duhB1A0d3zr4kpjbxZyIoTl8yoxIPb"}]},"maintainers":[{"name":"antoineschaller","email":"antoine.schaller@akson.ch"}],"_npmUser":{"name":"antoineschaller","email":"antoine.schaller@akson.ch"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/swissqrbill_2.0.2_1597846903794_0.14332730154485196"},"_hasShrinkwrap":false},"2.0.3":{"name":"@antoineschaller/swissqrbill","version":"2.0.3","description":"Swiss QR Bill generation in Node.js and browsers ","main":"./lib/node","browser":"./lib/browser","scripts":{"test":"tsc && cd tests && sh run.sh","test-windows":"tsc && cd tests && call run-windows.bat","build":"sudo tsc && webpack --mode development"},"repository":{"type":"git","url":"git+https://github.com/Rogerrrrrrrs/SwissQRBill.git"},"keywords":["swiss","switzerland","schweiz","qr","bill","invoice","rechnung"],"author":{"name":"Roger Schönbächler"},"license":"MIT","bugs":{"url":"https://github.com/Rogerrrrrrrs/SwissQRBill/issues"},"homepage":"https://github.com/Rogerrrrrrrs/SwissQRBill#readme","devDependencies":{"@types/iban":"0.0.30","@types/node":"^14.0.0","@types/qrcode":"^1.3.4","@types/qrcode-svg":"^1.1.0","@types/svg-parser":"^2.0.1","@typescript-eslint/eslint-plugin":"^2.24.0","@typescript-eslint/parser":"^2.24.0","@types/blob-stream":"^0.1.30","eslint":"^6.8.0","ts-loader":"^8.0.0","typescript":"^3.9.6","webpack":"^4.43.0","webpack-cli":"^3.3.12"},"dependencies":{"blob-stream":"^0.1.3","iban":"0.0.14","pdfkit":"^0.11.0","qrcode-svg":"^1.1.0","svg-parser":"^2.0.4","svgpath":"^2.2.3"},"directories":{"doc":"doc","example":"examples","lib":"lib","test":"tests"},"gitHead":"d19cd409a818046c617a0151aa8c9f59de1d3a60","_id":"@antoineschaller/swissqrbill@2.0.3","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-REBvHe/IuCwjC4LR/UhZCOjTxiAIEmGPVtMvXNC8wQTsz+fs4tm3pU3SIUj7uXHa6RlmpwcBZL6CrMF6tdOeMA==","shasum":"814359f9c1ad4fb259d875996ab44c04e89c905e","tarball":"https://registry.npmjs.org/@antoineschaller/swissqrbill/-/swissqrbill-2.0.3.tgz","fileCount":16,"unpackedSize":7827971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPVEnCRA9TVsSAnZWagAADv4P+wR3nUSVOrNUGZ0a+III\nJHphUxEYhBZRgDIHv4aST9q1kFlLfyA04l43e7MZneUSNDRomiAfxijxWBgl\naTjx0mLuPB7IGLs/7TmbPlTbvkELq6xUl0NAqxIipjn/OKj4/FlmZXwapZUh\n5a2BzfylD+MuPQ7MWqX3ppVo2KZfhspsb84n/3p3w04w1jFsCtW7DLYQFvLo\noylXId/saV0mhjv8iE0nTkvkWus4i8NTfvxs7isP7ktZNo9cLmDIYju/80aX\nP5G1Dl64tLfwOfpfkueIGBpWz4CQv7uxMZNV5mWZPCYKfeAJpMIsD5dBY+C1\nlpGMonLWft1yKnrQi+lVNNRcgv7fIR8iU2FWt4qv+AjcKxd6HEXTNWFEH6Ia\n0xNF9yVy8J06OD634rkMjHvmTDbczm/r6OJHbKfRi83e39RxEdTcQhr+iXqM\nwGhQnhSVqCm3/lsSp3mLLHkteWFO9m8GdVcor6oz5NbhLWytWWksvRP0I2OC\nvPEUdOLjbJ8CQ1tdi5w/k76v2b+Ukz2J0oyIdtAXQU0W5ufnJX3O+Nt/K4HT\n3BWHDSMXvUtsl6zluTph4n/FFaosm2gfR1sUq+L+k85pgFsTKoFVnNqT4jTr\nqBRzJGZPvHMISfAd782nJ2pSwnSBcg1MRQI1gF48VMgQtsMC8jJNGJf/LKeb\nLL62\r\n=i0G6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsmXY9f+P1I/RZN74UzZBLWQWhgcUFkbVAHlHp4LpZLAiEAqvSM7tCP4HCkGNCVxqvWd+mPCL0Hf1cgUaZhHktoSL0="}]},"maintainers":[{"name":"antoineschaller","email":"antoine.schaller@akson.ch"}],"_npmUser":{"name":"antoineschaller","email":"antoine.schaller@akson.ch"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/swissqrbill_2.0.3_1597853990990_0.6256510420969557"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-19T14:21:43.758Z","2.0.2":"2020-08-19T14:21:44.053Z","modified":"2022-04-04T14:23:03.268Z","2.0.3":"2020-08-19T16:19:51.203Z"},"maintainers":[{"name":"antoineschaller","email":"antoine.schaller@akson.ch"}],"description":"Swiss QR Bill generation in Node.js and browsers ","homepage":"https://github.com/Rogerrrrrrrs/SwissQRBill#readme","keywords":["swiss","switzerland","schweiz","qr","bill","invoice","rechnung"],"repository":{"type":"git","url":"git+https://github.com/Rogerrrrrrrs/SwissQRBill.git"},"author":{"name":"Roger Schönbächler"},"bugs":{"url":"https://github.com/Rogerrrrrrrs/SwissQRBill/issues"},"license":"MIT","readme":"# SwissQRBill\n<a href=\"https://github.com/Rogerrrrrrrs/SwissQRBill/blob/master/LICENSE\">\n  <img alt=\"MIT License\" src=\"https://img.shields.io/npm/l/swissqrbill?color=brightgreen&style=flat-square\">\n</a>\n<a href=\"https://www.npmjs.com/package/swissqrbill\">\n  <img alt=\"Version\" src=\"https://img.shields.io/npm/v/swissqrbill?color=brightgreen&style=flat-square\">\n</a>\n<a href=\"https://github.com/Rogerrrrrrrs/SwissQRBill/issues\">\n  <img alt=\"Issues\" src=\"https://img.shields.io/github/issues-raw/rogerrrrrrrs/swissqrbill?style=flat-square\">\n</a>\n<a href=\"https://www.npmjs.com/package/swissqrbill\">\n  <img alt=\"Dependencies\" src=\"https://img.shields.io/david/rogerrrrrrrs/swissqrbill?style=flat-square\">\n</a>\n<a href=\"https://www.npmjs.com/package/swissqrbill\">\n  <img alt=\"Downloads\" src=\"https://img.shields.io/npm/dw/swissqrbill?style=flat-square\">\n</a>\n<a href=\"https://github.com/Rogerrrrrrrs/SwissQRBill/actions?query=workflow%3ACI\">\n  <img alt=\"CI\" src=\"https://img.shields.io/github/workflow/status/Rogerrrrrrrs/SwissQRBill/CI?style=flat-square\">\n</a>\n\n<br/>\n<br/>\n\nWith SwissQRBill you can easily generate the new QR Code payment slips in Node.js and the browser. The new QR Code payment slips were introduced in Switzerland on June 30th, 2020 and should gradually replace the current payment slips. In addition to the payment section, you can generate a complete invoice with SwissQRBill by inserting your own content above the payment section.\n\n<br/>\n<br/>\n\n[<img src=\"https://raw.githubusercontent.com/Rogerrrrrrrs/SwissQRBill/master/assets/qrbill.png\">](https://github.com/Rogerrrrrrrs/SwissQRBill/blob/master/assets/qrbill.pdf)\n\n\n## Links\n\n * [Features](#features)\n * [Installation](#installation)\n * [Quick start](#quick-start)\n * [Browser usage](#browser-usage)\n * [API documentation](https://github.com/Rogerrrrrrrs/SwissQRBill/blob/master/doc/api.md)\n * [PDFKit documentation](http://pdfkit.org/docs/getting_started.html)\n * [How to guide to create a complete bill](https://github.com/Rogerrrrrrrs/SwissQRBill/blob/master/doc/how-to-create-a-complete-bill.md)\n\n\n## Features\n - Generates PDF with scalable vector graphics\n - Works in browser and node\n - Supports german, english, italian and french invoices\n - Supports A4 invoices as well as A6/5 (QR Bill only)\n - Allows you to add other content above the invoice using [PDFKit](https://github.com/foliojs/pdfkit)\n - Easy to use\n - Free and open source\n\n\n## Installation\n\n```\nnpm i swissqrbill --save\n```\n\n## Quick start\n\nIt's quite easy to create a simple QR bill. All you have to do is create a new `SwissQRBill.PDF` instance and pass your billing data object as the first parameter and your output path as the second parameter.\n\n```js\nconst SwissQRBill = require(\"swissqrbill\");\n\nconst data = {\n  currency: \"CHF\",\n  amount: 1199.95,\n  reference: \"210000000003139471430009017\",\n  creditor: {\n    name: \"Robert Schneider AG\",\n    address: \"Rue du Lac 1268\",\n    zip: 2501,\n    city: \"Biel\",\n    account: \"CH4431999123000889012\",\n    country: \"CH\"\n  },\n  debtor: {\n    name: \"Pia-Maria Rutschmann-Schnyder\",\n    address: \"Grosse Marktgasse 28\",\n    zip: 9400,\n    city: \"Rorschach\",\n    country: \"CH\"\n  }\n};\n\nconst pdf = new SwissQRBill.PDF(data, \"qrbill.pdf\", () => {\n  console.log(\"PDF has been successfully created.\");\n});\n```\n\nThis will create the above PDF file. You can pass an optional third parameter containing options such as language or size etc. as well as a callback function that gets called right after the file has finished writing.\nA complete documentation for all methods and parameters can be found in [doc/api.md](https://github.com/Rogerrrrrrrs/SwissQRBill/blob/master/doc/api.md).\n\n<br/>\n\n## Browser usage\n\nTo use SwissQRBill inside browsers, you have to pass a writeableStream in the second parameter, instead of the output path. To create a writeableStream in the browser you can use the built in `SwissQRBill.blobStream()` method.\n\n```js\nconst stream = SwissQRBill.blobStream();\n\nconst pdf = new SwissQRBill.PDF(data, stream);\n\npdf.on(\"finish\", () => {\n  const iframe = document.getElementById(\"iframe\") as HTMLIFrameElement;\n  if(iframe){\n    iframe.src = stream.toBlobURL(\"application/pdf\");\n  }\n  console.log(\"PDF has been successfully created.\");\n});\n```\n\nYou can see a fully working example over at https://github.com/Rogerrrrrrrs/SwissQRBill-browser-example.\n\n<br/>\n\n## Further informations\n\nSwissQRBill extends [PDFKit](https://github.com/foliojs/pdfkit) to generate PDF files and adds a few extra methods. You can generate a complete PDF bill using the original PDFKit methods and the additional methods documented in [doc/api.md](https://github.com/Rogerrrrrrrs/SwissQRBill/tree/master/doc/api.md#methods).\nThe documentation for PDFKit can be found [here](http://pdfkit.org/docs/getting_started.html).\n\nA simple how to guide to generate a complete bill can be found in [doc/how-to-create-a-complete-bill.md](https://github.com/Rogerrrrrrrs/SwissQRBill/blob/master/doc/how-to-create-a-complete-bill.md). You will learn how to create a PDF that looks like this:\n\n[<img src=\"https://raw.githubusercontent.com/Rogerrrrrrrs/SwissQRBill/master/assets/complete-qr-bill.png\">](https://github.com/Rogerrrrrrrs/SwissQRBill/tree/master/doc/how-to-create-a-complete-bill.md)","readmeFilename":"README.md"}