Socket
Socket
Sign inDemoInstall

swissqrbill

Package Overview
Dependencies
69
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0-beta.4 to 4.0.0-beta.5

14

package.json
{
"version": "4.0.0-beta.4",
"version": "4.0.0-beta.5",
"type": "module",

@@ -8,9 +8,9 @@ "name": "swissqrbill",

"author": "Roger Schönbächler",
"homepage": "https://github.com/schoero/SwissQRBill#readme",
"homepage": "https://github.com/schoero/swissqrbill#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/schoero/SwissQRBill.git"
"url": "git+https://github.com/schoero/swissqrbill.git"
},
"bugs": {
"url": "https://github.com/schoero/SwissQRBill/issues"
"url": "https://github.com/schoero/swissqrbill/issues"
},

@@ -105,3 +105,3 @@ "sideEffects": false,

"@schoero/changelog-config": "^0.0.2",
"@schoero/cspell-config": "^1.8.2",
"@schoero/cspell-config": "^1.9.0",
"@schoero/eslint-config": "^1.42.0",

@@ -119,5 +119,5 @@ "@schoero/markdownlint-config": "^1.1.7",

"glob": "^10.3.10",
"pdfkit": "^0.13.0",
"pdfkit": "^0.14.0",
"typescript": "^5.2.2",
"unwritten": "^0.2.3",
"unwritten": "^0.2.4",
"vite-plugin-dts": "^3.6.3",

@@ -124,0 +124,0 @@ "vite-plugin-no-bundle": "^3.0.0",

<div align="center">
<img alt="SwissQRBill" src="https://raw.githubusercontent.com/schoero/SwissQRBill/main/assets/swissqrbill-logo.svg">
<img alt="SwissQRBill" src="https://raw.githubusercontent.com/schoero/swissqrbill/main/assets/swissqrbill-logo.svg">
</div>

@@ -22,3 +22,3 @@

With 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 replaces the old payment slips since October 1st, 2022. In addition to the payment section, you can [generate a complete invoice](#further-information) with SwissQRBill by inserting your own content above the payment section.
With SwissQRBill you can easily generate the new QR Code payment slips as a PDF or SVG in Node.js and the browser. The new QR Code payment slips were introduced in Switzerland on June 30th, 2020 and replaces the old payment slips since October 1st, 2022. In addition to the payment section, you can [generate a complete invoice](#creating-a-complete-invoice) with [PDFKit][pdfkit-npm] by inserting your own content above the payment section.

@@ -38,9 +38,10 @@ <br/>

* [Installation](#installation)
* [Importing the library](#importing-the-library)
* [Importing the library][importing-documentation]
* [Quick start](#quick-start)
* [API documentation](./docs)
* [PDFKit documentation](http://pdfkit.org/docs/getting_started.html)
* [how to create a complete qr bill](./docs/how-to-create-a-complete-qr-bill.md)
* [PDFKit documentation][pdfkit-documentation]
* [How to create a complete qr bill][how-to-create-a-complete-qr-bill]
* [QR bill validator](https://swiss-qr-invoice.org/validator/?lang=de)
* [QR bill specifications](https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-en.pdf)
* [QR bill style guide](https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/style-guide-qr-bill-en.pdf)

@@ -63,3 +64,3 @@ <br/>

* Supports german, english, italian and french invoices.
* Allows you to add other content above the invoice using [PDFKit](https://github.com/foliojs/pdfkit).
* Allows you to add other content above the invoice using [PDFKit][pdfkit-github].
* Easy to use.

@@ -80,3 +81,3 @@ * Free and open source.

Depending on the environment you are using, you may need to import the library differently. Please read the [importing documentation][importing documentation] to find out the best way to import the library for your environment.
SwissQRBill is based around [PDFKit][pdfkit-npm]. Depending on the environment you are using, you may need to import the libraries differently. Please read the [importing documentation][importing-documentation] to find out the best way to import the libraries for your environment.

@@ -87,3 +88,3 @@ <br/>

Once you have imported SwissQRBill, it is quite easy to create a simple QR bill. All you have to do is to create a new `SwissQRBill` instance and pass your billing data object as the first parameter and your output path as the second parameter.
Once you have imported SwissQRBill and PDFKit, it is quite easy to create a simple QR bill. All you have to do is to create a new [`SwissQRBill`][SwissQRBill] instance with your billing data object. You can then attach the QR bill to any PDFKit document.

@@ -121,10 +122,12 @@ ```js

const qrBill = new SwissQRBill(data);
const stream = createWriteStream("qr-bill.pdf");
qrBill.attachTo(pdf);
pdf.pipe(stream);
qrBill.attachTo(pdf);
pdf.end();
```
This will create the PDF file above. You can pass an optional parameter containing options to the `SwissQRBill` constructor.
A complete documentation for all methods and parameters can be found in the [docs/][repository docs] directory of this repository.
This will create the PDF file above. You can pass an optional parameter containing options to the [`SwissQRBill constructor`][SwissQRBill-constructor].
A complete documentation for all methods and parameters can be found in the [docs/][repository-docs] directory of this repository.

@@ -140,2 +143,3 @@ <br/>

const svg = new SwissQRBill(data);
document.body.appendChild(svg.element);

@@ -147,13 +151,23 @@ ```

## Further information
## Creating a complete invoice
SwissQRBill uses [PDFKit](https://github.com/foliojs/pdfkit) to generate the PDF files.
The documentation for PDFKit can be found [here](http://pdfkit.org/docs/getting_started.html).
It is possible to create a complete invoice with SwissQRBill. This means that you can add your own content above the QR Bill.
A simple guide how to generate a complete bill can be found in [docs/how-to-create-a-complete-qr-bill.md][how to create a complete qr bill]. You will learn how to create a PDF that looks like this:
SwissQRBill is based around [PDFKit][pdfkit-github] to generate the PDF files. You can use all the features of PDFKit to add your own content to the PDF file.
The documentation for PDFKit can be found on [pdfkit.org][pdfkit-documentation].
A simple guide how to generate a complete bill can be found in [docs/how-to-create-a-complete-qr-bill.md][how-to-create-a-complete-qr-bill]. You will learn how to create a PDF that looks like this:
<br/>
![Complete QR bill](assets/complete-qr-bill.png)
[importing documentation]: ./docs/importing.md
[repository docs]: ./docs/
[how to create a complete qr bill]: ./docs/how-to-create-a-complete-qr-bill.md
[SwissQRBill]: ./docs/pdf/index.md#class-swissqrbill
[SwissQRBill-constructor]: ./docs/pdf/index.md#constructor-new-swissqrbilldata-options
[importing-documentation]: ./docs/importing.md
[repository-docs]: ./docs/
[how-to-create-a-complete-qr-bill]: ./docs/how-to-create-a-complete-qr-bill.md
[pdfkit-documentation]: http://pdfkit.org
[pdfkit-github]: https://github.com/foliojs/pdfkit
[pdfkit-npm]: https://www.npmjs.com/package/pdfkit
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc