Skip to content

Commit

Permalink
docs: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
schoero committed Nov 1, 2023
1 parent 74316c2 commit 9dd0f09
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 41 deletions.
42 changes: 22 additions & 20 deletions docs/bundle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

- Methods

- [attachTo(doc, xPosition, yPosition)](#pdfswissqrbillattachtodoc-xposition-yposition)
- [attachTo(doc, x, y)](#pdfswissqrbillattachtodoc-x-y)
- [isSpaceSufficient(doc, xPosition, yPosition)](#pdfswissqrbillisspacesufficientdoc-xposition-yposition)

- [SwissQRCode](#pdfswissqrcode)
Expand All @@ -31,7 +31,7 @@

- Method

- [attachTo(doc)](#pdfswissqrcodeattachtodoc)
- [attachTo(doc, x, y)](#pdfswissqrcodeattachtodoc-x-y)

- [Table](#pdftable)

Expand All @@ -41,7 +41,7 @@

- Method

- [attachTo(doc)](#pdftableattachtodoc)
- [attachTo(doc, x, y)](#pdftableattachtodoc-x-y)

- Interfaces

Expand Down Expand Up @@ -154,7 +154,7 @@ Defined in: [src/pdf/swissqrbill.ts](../../src/pdf/swissqrbill.ts#L14C0)
##### Description

The SwissQRBill class creates the Payment Part with the QR Code. It can be attached to any PDFKit document instance
using the [`attachTo`](#pdfswissqrbillattachtodoc-xposition-yposition) method.
using the [`attachTo`](#pdfswissqrbillattachtodoc-x-y) method.

##### Construct Signature

Expand Down Expand Up @@ -215,7 +215,7 @@ The vertical size of the QR Bill.

---

###### pdf.SwissQRBill.attachTo(doc, xPosition, yPosition)
###### pdf.SwissQRBill.attachTo(doc, x, y)

`public`

Expand All @@ -224,8 +224,8 @@ Defined in: [src/pdf/swissqrbill.ts](../../src/pdf/swissqrbill.ts#L69C2)
###### Parameters

- **doc** `PDFDocument` The PDFKit instance
- **xPosition** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The horizontal position where the QR Bill will be placed. Default: `0`
- **yPosition** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The vertical position where the QR Bill will be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
- **x** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The horizontal position in points where the QR Bill will be placed. Default: `0`
- **y** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The vertical position in points where the QR Bill will be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)

###### Return Type

Expand Down Expand Up @@ -289,15 +289,17 @@ Creates a Swiss QR Code.

---

###### pdf.SwissQRCode.attachTo(doc)
###### pdf.SwissQRCode.attachTo(doc, x, y)

`public`

Defined in: [src/pdf/swissqrcode.ts](../../src/pdf/swissqrcode.ts#L27C2)
Defined in: [src/pdf/swissqrcode.ts](../../src/pdf/swissqrcode.ts#L29C2)

###### Parameter
###### Parameters

- **doc** `PDFDocument` The PDF document to attach the Swiss QR Code to.
- **x** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The horizontal position in points where the Swiss QR Code will be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
- **y** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The vertical position in points where the Swiss QR Code will be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)

###### Return Type

Expand Down Expand Up @@ -355,14 +357,12 @@ Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L1C0)
- **pdf.textOptions** `TextOptions` Same as text [PDFKit text options](http://pdfkit.org/docs/text.html#text_styling). `optional`
- **pdf.verticalAlign** `"bottom"` | `"center"` | `"top"` Vertical alignment of texts inside the table `optional`
- **pdf.width** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) Width of whole table. `optional`
- **pdf.x** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) Horizontal start position of the table. `optional`
- **pdf.y** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) Vertical start position of the table. `optional`

---

#### pdf.PDFRow

Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L32C0)
Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L29C0)

- **pdf.columns** [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) Table columns.

Expand Down Expand Up @@ -414,7 +414,7 @@ Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L32C0)

#### pdf.PDFColumn

Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L65C0)
Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L62C0)

- **pdf.text** [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) | [`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) Cell text.
- **pdf.align** `"center"` | `"left"` | `"right"` Horizontal alignment of the text inside the cell `optional`
Expand Down Expand Up @@ -460,15 +460,15 @@ Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L65C0)

#### pdf.Table

Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L100C0)
Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L97C0)

##### Construct Signature

---

###### new pdf.Table(data)

Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L136C2)
Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L133C2)

###### Parameter

Expand Down Expand Up @@ -517,19 +517,21 @@ const table = {

---

###### pdf.Table.attachTo(doc)
###### pdf.Table.attachTo(doc, x, y)

`public`

Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L158C2)
Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L156C2)

###### Parameter
###### Parameters

- **doc** `PDFDocument` The PDFKit document instance
- **x** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The horizontal position in points where the table be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
- **y** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The vertical position in points where the table will be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)

###### Return Type

[`Table`](#pdftable) The Table instance.
`void`

###### Throws

Expand Down
2 changes: 1 addition & 1 deletion docs/migration-v3-to-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ If you previously used the pre built bundle, provided by SwissQRBill, you now ha
### Standalone classes

Since SwissQRBill is now a standalone class, you have to create the PDFDocument separately from the QR slip.
You can then attach the QR slip to the document using the [`attachTo()`](./pdf/index.md#attachtodoc-xposition-yposition) method.
You can then attach the QR slip to the document using the [`attachTo()`](./pdf/index.md#swissqrbillattachtodoc-x-y) method.

```ts
const pdf = new PDFDocument();
Expand Down
42 changes: 22 additions & 20 deletions docs/pdf/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- Methods

- [attachTo(doc, xPosition, yPosition)](#swissqrbillattachtodoc-xposition-yposition)
- [attachTo(doc, x, y)](#swissqrbillattachtodoc-x-y)
- [isSpaceSufficient(doc, xPosition, yPosition)](#swissqrbillisspacesufficientdoc-xposition-yposition)

- [SwissQRCode](#swissqrcode)
Expand All @@ -27,7 +27,7 @@

- Method

- [attachTo(doc)](#swissqrcodeattachtodoc)
- [attachTo(doc, x, y)](#swissqrcodeattachtodoc-x-y)

- [Table](#table)

Expand All @@ -37,7 +37,7 @@

- Method

- [attachTo(doc)](#tableattachtodoc)
- [attachTo(doc, x, y)](#tableattachtodoc-x-y)

- Interfaces

Expand All @@ -56,7 +56,7 @@ Defined in: [src/pdf/swissqrbill.ts](../../src/pdf/swissqrbill.ts#L14C0)
#### Description

The SwissQRBill class creates the Payment Part with the QR Code. It can be attached to any PDFKit document instance
using the [`attachTo`](#swissqrbillattachtodoc-xposition-yposition) method.
using the [`attachTo`](#swissqrbillattachtodoc-x-y) method.

#### Construct Signature

Expand Down Expand Up @@ -117,7 +117,7 @@ The vertical size of the QR Bill.

---

##### SwissQRBill.attachTo(doc, xPosition, yPosition)
##### SwissQRBill.attachTo(doc, x, y)

`public`

Expand All @@ -126,8 +126,8 @@ Defined in: [src/pdf/swissqrbill.ts](../../src/pdf/swissqrbill.ts#L69C2)
###### Parameters

- **doc** `PDFDocument` The PDFKit instance
- **xPosition** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The horizontal position where the QR Bill will be placed. Default: `0`
- **yPosition** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The vertical position where the QR Bill will be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
- **x** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The horizontal position in points where the QR Bill will be placed. Default: `0`
- **y** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The vertical position in points where the QR Bill will be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)

###### Return Type

Expand Down Expand Up @@ -191,15 +191,17 @@ Creates a Swiss QR Code.

---

##### SwissQRCode.attachTo(doc)
##### SwissQRCode.attachTo(doc, x, y)

`public`

Defined in: [src/pdf/swissqrcode.ts](../../src/pdf/swissqrcode.ts#L27C2)
Defined in: [src/pdf/swissqrcode.ts](../../src/pdf/swissqrcode.ts#L29C2)

###### Parameter
###### Parameters

- **doc** `PDFDocument` The PDF document to attach the Swiss QR Code to.
- **x** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The horizontal position in points where the Swiss QR Code will be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
- **y** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The vertical position in points where the Swiss QR Code will be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)

###### Return Type

Expand All @@ -213,15 +215,15 @@ Attaches the Swiss QR Code to a PDF document.

### Table

Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L100C0)
Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L97C0)

#### Construct Signature

---

##### new Table(data)

Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L136C2)
Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L133C2)

###### Parameter

Expand Down Expand Up @@ -270,19 +272,21 @@ const table = {

---

##### Table.attachTo(doc)
##### Table.attachTo(doc, x, y)

`public`

Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L158C2)
Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L156C2)

###### Parameter
###### Parameters

- **doc** `PDFDocument` The PDFKit document instance
- **x** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The horizontal position in points where the table be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
- **y** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) The vertical position in points where the table will be placed. Default: [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)

###### Return Type

[`Table`](#table) The Table instance.
`void`

###### Throws

Expand Down Expand Up @@ -342,14 +346,12 @@ Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L1C0)
- **textOptions** `TextOptions` Same as text [PDFKit text options](http://pdfkit.org/docs/text.html#text_styling). `optional`
- **verticalAlign** `"bottom"` | `"center"` | `"top"` Vertical alignment of texts inside the table `optional`
- **width** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) Width of whole table. `optional`
- **x** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) Horizontal start position of the table. `optional`
- **y** [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) Vertical start position of the table. `optional`

---

### PDFRow

Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L32C0)
Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L29C0)

- **columns** [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) Table columns.

Expand Down Expand Up @@ -401,7 +403,7 @@ Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L32C0)

### PDFColumn

Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L65C0)
Defined in: [src/pdf/table.ts](../../src/pdf/table.ts#L62C0)

- **text** [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) | [`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) Cell text.
- **align** `"center"` | `"left"` | `"right"` Horizontal alignment of the text inside the cell `optional`
Expand Down

0 comments on commit 9dd0f09

Please sign in to comment.