Skip to content

Commit

Permalink
style: enforce markdownlint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
schoero committed Dec 12, 2022
1 parent d9e7857 commit d12f1bc
Show file tree
Hide file tree
Showing 6 changed files with 351 additions and 308 deletions.
3 changes: 3 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@schoero/markdownlint-config"
}
184 changes: 105 additions & 79 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,132 +2,158 @@
# Change Log

# [v3.1.5](https://github.com/schoero/swissqrbill/compare/v3.1.4...v3.1.5) - 21.02.2022
* Fixed umlauts not correctly decoded with PostFinance scanner. [#367](https://github.com/schoero/SwissQRBill/pull/367)
* QR-Bills rendered as SVG now have a white background color.

* Fixed umlauts not correctly decoded with PostFinance scanner. [#367](https://github.com/schoero/SwissQRBill/pull/367)
* QR-Bills rendered as SVG now have a white background color.

# [v3.1.4](https://github.com/schoero/swissqrbill/compare/v3.1.3...v3.1.4) - 11.01.2022
* Fixed rendering of debtor rectangle in when page size is A4. [#361](https://github.com/schoero/SwissQRBill/pull/361)
* Fixed rendering of country code for foreign payments. [#362](https://github.com/schoero/SwissQRBill/pull/362)
* Fixed missing of `-` character in svg text rendering. [#363](https://github.com/schoero/SwissQRBill/pull/363)

* Fixed rendering of debtor rectangle in when page size is A4. [#361](https://github.com/schoero/SwissQRBill/pull/361)
* Fixed rendering of country code for foreign payments. [#362](https://github.com/schoero/SwissQRBill/pull/362)
* Fixed missing of `-` character in svg text rendering. [#363](https://github.com/schoero/SwissQRBill/pull/363)

# [v3.1.3](https://github.com/schoero/swissqrbill/compare/v3.1.2...v3.1.3) - 05.12.2021
* Fixed rendering of AV1 and AV2. [#357](https://github.com/schoero/SwissQRBill/pull/357)

* Fixed rendering of AV1 and AV2. [#357](https://github.com/schoero/SwissQRBill/pull/357)

# [v3.1.2](https://github.com/schoero/swissqrbill/compare/v3.1.1...v3.1.2) - 26.11.2021
* Removed deprecated restrictions for AV1 and AV2. [#355](https://github.com/schoero/SwissQRBill/pull/355)

* Removed deprecated restrictions for AV1 and AV2. [#355](https://github.com/schoero/SwissQRBill/pull/355)

# [v3.1.1](https://github.com/schoero/swissqrbill/compare/v3.1.0...v3.1.1) - 13.11.2021
* Fixed swiss cross positioning for PDF rendering. [#353](https://github.com/schoero/SwissQRBill/pull/353)

* Fixed swiss cross positioning for PDF rendering. [#353](https://github.com/schoero/SwissQRBill/pull/353)

# [v3.1.0](https://github.com/schoero/swissqrbill/compare/v3.0.1...v3.1.0) - 12.11.2021
* Added TSDoc comments. [#348](https://github.com/schoero/SwissQRBill/pull/348)
* Removed unwanted space in `utils.formatAmount()`. [#349](https://github.com/schoero/SwissQRBill/pull/349)
* Fixed the formatting of the reference in SVG renderings. [#351](https://github.com/schoero/SwissQRBill/pull/351)
* Added a new `utils.formatReference()` function that auto detects the reference type.
* Improved the text spacing and positioning. [#352](https://github.com/schoero/SwissQRBill/pull/352)

* Added TSDoc comments. [#348](https://github.com/schoero/SwissQRBill/pull/348)
* Removed unwanted space in `utils.formatAmount()`. [#349](https://github.com/schoero/SwissQRBill/pull/349)
* Fixed the formatting of the reference in SVG renderings. [#351](https://github.com/schoero/SwissQRBill/pull/351)
* Added a new `utils.formatReference()` function that auto detects the reference type.
* Improved the text spacing and positioning. [#352](https://github.com/schoero/SwissQRBill/pull/352)

# [v3.0.1](https://github.com/schoero/swissqrbill/compare/v3.0.0...v3.0.1) - 14.10.2021
* Changed build target to ES6 to support older Browsers and Node.js versions. [#347](https://github.com/schoero/SwissQRBill/pull/347)

* Changed build target to ES6 to support older Browsers and Node.js versions. [#347](https://github.com/schoero/SwissQRBill/pull/347)

# [v3.0.0](https://github.com/schoero/swissqrbill/compare/v2.4.2...v3.0.0) - 03.10.2021
* New features
* SVG
* Added support for SVG rendering. [#343](https://github.com/schoero/SwissQRBill/issues/343)
* Added ES6 module exports.
* Support for tree shaking.
* utils
* Added `mm2px()` function.
* Added `px2mm()` function.
* Added `pt2mm()` function.
* Breaking changes
* imports
* SwissQRBill is now available as a CommonJS and an ES module. This may change how the module has to be imported. Please take a look at the [importing the library](https://github.com/schoero/SwissQRBill#importing-the-library) section in the readme.
* data
* the field `houseNumber` has been renamed to `buildingNumber`.
* the deprecated field `debitor` has been removed. Use `debtor` instead.
* utils
* `mmToPoints()` function has been renamed to `mm2pt()`.
* PDF
* Removed deprecated `mmToPoints()` export. Use `utils.mm2pt()` instead.
* Fixes
* PDF
* The positioning of the box when no amount is provided has been slightly corrected.
* The positioning iban on the payment part has been slightly corrected.
* Fixed positioning of the debtor boxes when no debtor is provided and the creditor address break to multiple lines.

* New features
* SVG
* Added support for SVG rendering. [#343](https://github.com/schoero/SwissQRBill/issues/343)
* Added ES6 module exports.
* Support for tree shaking.
* utils
* Added `mm2px()` function.
* Added `px2mm()` function.
* Added `pt2mm()` function.
* Breaking changes
* imports
* SwissQRBill is now available as a CommonJS and an ES module. This may change how the module has to be imported. Please take a look at the [importing the library](https://github.com/schoero/SwissQRBill#importing-the-library) section in the readme.
* data
* the field `houseNumber` has been renamed to `buildingNumber`.
* the deprecated field `debitor` has been removed. Use `debtor` instead.
* utils
* `mmToPoints()` function has been renamed to `mm2pt()`.
* PDF
* Removed deprecated `mmToPoints()` export. Use `utils.mm2pt()` instead.
* Fixes
* PDF
* The positioning of the box when no amount is provided has been slightly corrected.
* The positioning iban on the payment part has been slightly corrected.
* Fixed positioning of the debtor boxes when no debtor is provided and the creditor address break to multiple lines.

# [v2.4.2](https://github.com/schoero/swissqrbill/compare/v2.4.1...v2.4.2) - 26.08.2021
* Fixed translation of `additionalInformation` and `payableByName`. [#342](https://github.com/schoero/SwissQRBill/pull/342)

* Fixed translation of `additionalInformation` and `payableByName`. [#342](https://github.com/schoero/SwissQRBill/pull/342)

# [v2.4.1](https://github.com/schoero/swissqrbill/compare/v2.4.0...v2.4.1) - 25.08.2021
* Fixed missing rendering of `message`. [#340](https://github.com/schoero/SwissQRBill/pull/340)

* Fixed missing rendering of `message`. [#340](https://github.com/schoero/SwissQRBill/pull/340)

# [v2.4.0](https://github.com/schoero/swissqrbill/compare/v2.3.3...v2.4.0) - 01.07.2021
* Added an optional size parameter to specify the new page size in `addQRBill()`. [#338](https://github.com/schoero/SwissQRBill/pull/338)

* Added an optional size parameter to specify the new page size in `addQRBill()`. [#338](https://github.com/schoero/SwissQRBill/pull/338)

# [v2.3.3](https://github.com/schoero/swissqrbill/compare/v2.3.1...v2.3.3) - 05.04.2021
* A string is now allowed for the zip code field. [#294](https://github.com/schoero/SwissQRBill/pull/294)

* A string is now allowed for the zip code field. [#294](https://github.com/schoero/SwissQRBill/pull/294)

# [v2.3.1](https://github.com/schoero/swissqrbill/compare/v2.3.0...v2.3.1) - 06.02.2021
* Removed iban dependency and integrated IBAN validation directly into the library.
* Fixed some misleading error messages.

* Removed iban dependency and integrated IBAN validation directly into the library.
* Fixed some misleading error messages.

# [v2.3.0](https://github.com/schoero/swissqrbill/compare/v2.2.0...v2.3.0) - 24.01.2021
* Added [options](https://github.com/schoero/SwissQRBill/blob/master/doc/api.md#options) to disable rendering of outlines, scissors icons or text `Separate before paying in`, for use with perforated or preprinted paper.

* Added [options](https://github.com/schoero/SwissQRBill/blob/master/doc/api.md#options) to disable rendering of outlines, scissors icons or text `Separate before paying in`, for use with perforated or preprinted paper.

# [v2.2.0](https://github.com/schoero/swissqrbill/compare/v2.1.0...v2.2.0) - 20.01.2021
* Switched from `fs.WriteStream` to `stream.Writable` in order to provide more streaming flexibility. [#207](https://github.com/schoero/SwissQRBill/pull/207)

* Switched from `fs.WriteStream` to `stream.Writable` in order to provide more streaming flexibility. [#207](https://github.com/schoero/SwissQRBill/pull/207)

# [v2.1.0](https://github.com/schoero/swissqrbill/compare/v2.0.3...v2.1.0) - 15.12.2020
* Changed the implemented QR code library to fix an issue that caused QR code scanning to fail on some QR readers.
* Added [utility functions](https://github.com/schoero/SwissQRBill/blob/master/doc/api.md#swissqrbillutils) to simplify the creation of QR bills.
* Added additional QR-Reference validation.

* Changed the implemented QR code library to fix an issue that caused QR code scanning to fail on some QR readers.
* Added [utility functions](https://github.com/schoero/SwissQRBill/blob/master/doc/api.md#swissqrbillutils) to simplify the creation of QR bills.
* Added additional QR-Reference validation.

# [v2.0.3](https://github.com/schoero/swissqrbill/compare/v2.0.2...v2.0.3) - 09.12.2020
* Fixed a problem with QR Code encoding that caused QR Code scanning to fail at certain banks.

* Fixed a problem with QR Code encoding that caused QR Code scanning to fail at certain banks.

# [v2.0.2](https://github.com/schoero/swissqrbill/compare/v2.0.1...v2.0.2) - 19.08.2020
* Fixed an issue that caused reference to render incorrectly.
* Fixed "Compte / Payable à" to display correctly in french QR bills.

* Fixed an issue that caused reference to render incorrectly.
* Fixed "Compte / Payable à" to display correctly in french QR bills.

# [v2.0.1](https://github.com/schoero/swissqrbill/compare/v2.0.0...v2.0.1) - 22.07.2020
* Small bug fixes and code cleanup.

* Small bug fixes and code cleanup.

# [v2.0.0](https://github.com/schoero/swissqrbill/compare/v1.3.1...v2.0.0) - 12.07.2020
* Added browser support.
- Added new blobStream method.
* Added possibility to stream the pdf into a buffer.

* Added browser support.
* Added new blobStream method.
* Added possibility to stream the pdf into a buffer.

# [v1.3.1](https://github.com/schoero/swissqrbill/compare/v1.3.0...v1.3.1) - 27.06.2020
* Fixed invalid QR Code field when the second decimal place in amount is a zero.

* Fixed invalid QR Code field when the second decimal place in amount is a zero.

# [v1.3.0](https://github.com/schoero/swissqrbill/compare/v1.2.0...v1.3.0) - 25.06.2020
* Tables
- Added new header property on table rows to automatically insert a header row on new pages.
- Table row height is now automatically calculated if not otherwise defined.
- Added padding property to rows and cells.
* Events
- Added new beforeEnd event that could be used to add page numbers.
- Added new pageAdded event that could be used to add a header to the pages.
* Renamed `debitor` property to `debtor`.
* Improved documentation.
* TypeScript declaration improvements.
* Fixed typos in examples.

* Tables
* Added new header property on table rows to automatically insert a header row on new pages.
* Table row height is now automatically calculated if not otherwise defined.
* Added padding property to rows and cells.
* Events
* Added new beforeEnd event that could be used to add page numbers.
* Added new pageAdded event that could be used to add a header to the pages.
* Renamed `debitor` property to `debtor`.
* Improved documentation.
* TypeScript declaration improvements.
* Fixed typos in examples.

# [v1.2.0](https://github.com/schoero/swissqrbill/compare/v1.1.0...v1.2.0) - 06.06.2020
* Added optional callback function that gets executed once the pdf file has completed writing.
* Emit finish event once the pdf file has completed writing.

* Added optional callback function that gets executed once the pdf file has completed writing.
* Emit finish event once the pdf file has completed writing.

# [v1.1.0](https://github.com/schoero/swissqrbill/compare/v1.0.6...v1.1.0) - 15.03.2020
* Fixed some validation checks.
* Improved error messages.
* Added new method to generate tables.
* Improved documentation.

* Fixed some validation checks.
* Improved error messages.
* Added new method to generate tables.
* Improved documentation.

# [v1.0.6](https://github.com/schoero/swissqrbill/compare/v1.0.5...v1.0.6) - 04.03.2020
* Fixed QR Code fields.
* Added user data validation.

* Fixed QR Code fields.
* Added user data validation.

# [v1.0.5](https://github.com/schoero/swissqrbill/compare/v1.0.4...v1.0.5) - 03.03.2020
* Fixed french characters.
* Removes new lines in userdata.
* Fixed some layout issues.

* Fixed french characters.
* Removes new lines in userdata.
* Fixed some layout issues.
65 changes: 32 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,34 +39,33 @@ With SwissQRBill you can easily generate the new QR Code payment slips in Node.j

[<img src="https://raw.githubusercontent.com/schoero/SwissQRBill/master/assets/qrbill.svg">](https://github.com/schoero/SwissQRBill/blob/master/assets/qrbill.pdf)


<br/>
<br/>

## Links

* [Features](#features)
* [Installation](#installation)
* [Importing the library](#importing-the-library)
* [Quick start](#quick-start)
* [Browser usage](#browser-usage)
* [API documentation](https://github.com/schoero/SwissQRBill/blob/master/doc/api.md)
* [PDFKit documentation](http://pdfkit.org/docs/getting_started.html)
* [How to create a complete bill](https://github.com/schoero/SwissQRBill/blob/master/doc/how-to-create-a-complete-bill.md)
* [QR bill validator](https://swiss-qr-invoice.org/validator/?lang=de)
* [QR bill specifications](https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-en.pdf)

* [Features](#features)
* [Installation](#installation)
* [Importing the library](#importing-the-library)
* [Quick start](#quick-start)
* [Browser usage](#browser-usage)
* [API documentation](https://github.com/schoero/SwissQRBill/blob/master/doc/api.md)
* [PDFKit documentation](http://pdfkit.org/docs/getting_started.html)
* [How to create a complete bill](https://github.com/schoero/SwissQRBill/blob/master/doc/how-to-create-a-complete-bill.md)
* [QR bill validator](https://swiss-qr-invoice.org/validator/?lang=de)
* [QR bill specifications](https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-en.pdf)

<br/>

## Features
- Generate complete invoices, or only the QR Bill, as a PDF file.
- Generate the QR Bill as a scalable vector graphic (SVG).
- Works in browsers and Node.js.
- Supports german, english, italian and french invoices.
- Allows you to add other content above the invoice using [PDFKit](https://github.com/foliojs/pdfkit).
- Easy to use.
- Free and open source.

* Generate complete invoices, or only the QR Bill, as a PDF file.
* Generate the QR Bill as a scalable vector graphic (SVG).
* Works in browsers and Node.js.
* Supports german, english, italian and french invoices.
* Allows you to add other content above the invoice using [PDFKit](https://github.com/foliojs/pdfkit).
* Easy to use.
* Free and open source.

<br/>

Expand Down Expand Up @@ -128,8 +127,7 @@ import SwissQRBill from "swissqrbill/lib/browser/bundle";
```
However, if you want to take advantage of tree-shaking in the browser, you have to bundle the library by yourself.
You can find an example, how this could be done using webpack, at https://github.com/schoero/SwissQRBill-browser-example.
You can find an example, how this could be done using webpack, at <https://github.com/schoero/SwissQRBill-browser-example>.
<br/>
<br/>
Expand All @@ -142,26 +140,26 @@ Once you have imported SwissQRBill, it is quite easy to create a simple QR bill.
import { PDF } from "swissqrbill/pdf";
const data = {
currency: "CHF",
amount: 1199.95,
reference: "210000000003139471430009017",
creditor: {
name: "Robert Schneider AG",
account: "CH4431999123000889012",
address: "Rue du Lac",
buildingNumber: "1268",
zip: 2501,
city: "Biel",
account: "CH4431999123000889012",
country: "CH"
country: "CH",
name: "Robert Schneider AG",
zip: 2501
},
currency: "CHF",
debtor: {
name: "Pia-Maria Rutschmann-Schnyder",
address: "Grosse Marktgasse",
buildingNumber: "28",
zip: 9400,
city: "Rorschach",
country: "CH"
}
country: "CH",
name: "Pia-Maria Rutschmann-Schnyder",
zip: 9400
},
reference: "210000000003139471430009017"
};
const pdf = new PDF(data, "qrbill.pdf", () => {
Expand All @@ -182,7 +180,7 @@ A complete documentation for all methods and parameters can be found in [doc/api
To use SwissQRBill inside browsers, you have to pass a writableStream in the second parameter, instead of the output path. To create a writableStream in the browser you can use the built in `SwissQRBill.BlobStream()` function.
```js
import { PDF, BlobStream } from "swissqrbill/pdf";
import { BlobStream, PDF } from "swissqrbill/pdf";
const stream = new BlobStream();
const pdf = new PDF(data, stream);
Expand All @@ -204,6 +202,7 @@ import { SVG } from "swissqrbill/svg";
const svg = new SVG(data);
document.body.appendChild(svg.element);
```
<br/>
<br/>
Expand All @@ -214,4 +213,4 @@ The documentation for PDFKit can be found [here](http://pdfkit.org/docs/getting_
A simple guide how to generate a complete bill can be found in [doc/how-to-create-a-complete-bill.md](https://github.com/schoero/SwissQRBill/blob/master/doc/how-to-create-a-complete-bill.md). You will learn how to create a PDF that looks like this:
[<img src="https://raw.githubusercontent.com/schoero/SwissQRBill/master/assets/complete-qr-bill.png">](https://github.com/schoero/SwissQRBill/tree/master/doc/how-to-create-a-complete-bill.md)
[<img src="https://raw.githubusercontent.com/schoero/SwissQRBill/master/assets/complete-qr-bill.png">](https://github.com/schoero/SwissQRBill/tree/master/doc/how-to-create-a-complete-bill.md)
Loading

0 comments on commit d12f1bc

Please sign in to comment.