pdfmake 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -1
- package/README.md +78 -78
- package/build/pdfmake.js +58792 -58550
- package/build/pdfmake.js.map +1 -1
- package/build/pdfmake.min.js +2 -2
- package/build/pdfmake.min.js.map +1 -1
- package/build-vfs.js +1 -1
- package/js/3rd-party/svg-to-pdfkit/source.js +241 -44
- package/js/DocMeasure.js +20 -12
- package/js/OutputDocumentServer.js +10 -3
- package/js/Printer.js +11 -14
- package/js/Renderer.js +6 -4
- package/js/SVGMeasure.js +41 -18
- package/js/StyleContextStack.js +1 -1
- package/js/TextInlines.js +2 -2
- package/js/base.js +7 -0
- package/js/browser-extensions/OutputDocumentBrowser.js +2 -1
- package/js/helpers/variableType.js +1 -1
- package/js/qrEnc.js +6 -6
- package/package.json +4 -4
- package/src/3rd-party/svg-to-pdfkit/source.js +230 -37
- package/src/DocMeasure.js +23 -12
- package/src/OutputDocumentServer.js +14 -3
- package/src/Printer.js +11 -14
- package/src/Renderer.js +9 -3
- package/src/SVGMeasure.js +47 -17
- package/src/StyleContextStack.js +1 -1
- package/src/TextInlines.js +2 -2
- package/src/base.js +9 -0
- package/src/browser-extensions/OutputDocumentBrowser.js +2 -1
- package/src/helpers/variableType.js +1 -1
- package/src/qrEnc.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.2 - 2026-01-11
|
|
4
|
+
|
|
5
|
+
- Fixed non-working `open()` and `print()` methods in browser
|
|
6
|
+
- Added SVG validation: width and height must be specified (in SVG string/element or `svg` node)
|
|
7
|
+
- Added support for image scaling with only `height` defined
|
|
8
|
+
- Added custom `markerColor` for each item of `ul` and `ol`
|
|
9
|
+
|
|
10
|
+
## 0.3.1 - 2026-01-07
|
|
11
|
+
|
|
12
|
+
- Added auto page height for multiple pages (for `section` or after custom page break)
|
|
13
|
+
- Added type validation for parameters in method `createPdf`
|
|
14
|
+
- Added support `SVGElement` object for `svg` node (`SVGElement` object is available only in browser)
|
|
15
|
+
- Updated svg-to-pdfkit library to the latest GitHub master commit
|
|
16
|
+
- Fixed a bug in the write method where it did not wait for the file write operation to complete
|
|
17
|
+
- Fixed SVG loading
|
|
18
|
+
- Fixed rendering SVG without viewBox
|
|
19
|
+
|
|
3
20
|
## 0.3.0 - 2026-01-01
|
|
4
21
|
|
|
5
22
|
- Reverted to the original `pdfkit` package, moving away from `@foliojs-fork`
|
|
@@ -10,7 +27,7 @@
|
|
|
10
27
|
- All methods return promise instead of using callback **(breaking change)**
|
|
11
28
|
- Change including virtual font storage in client-side **(breaking change)**
|
|
12
29
|
- Change parameters of `pageBreakBefore` function **(breaking change)**
|
|
13
|
-
- Support for loading font files and images via URL
|
|
30
|
+
- Support for loading font files and images via URL addresses (https:// or http:// protocol) in Node.js (client and server side now)
|
|
14
31
|
- Used fetch API for downloading fonts and images
|
|
15
32
|
- Attachments embedding
|
|
16
33
|
- Added `section` node
|
package/README.md
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
# pdfmake [![Node.js CI][githubactions_img]][githubactions_url] [![GitHub][github_img]][github_url] [![npm][npm_img]][npm_url] [![CDNJS][cdnjs_img]][cndjs_url]
|
|
2
|
-
|
|
3
|
-
[githubactions_img]: https://github.com/bpampuch/pdfmake/actions/workflows/node.js.yml/badge.svg?branch=master
|
|
4
|
-
[githubactions_url]: https://github.com/bpampuch/pdfmake/actions
|
|
5
|
-
|
|
6
|
-
[github_img]: https://img.shields.io/github/release/bpampuch/pdfmake.svg?colorB=0E7FBF
|
|
7
|
-
[github_url]: https://github.com/bpampuch/pdfmake/releases/latest
|
|
8
|
-
|
|
9
|
-
[npm_img]: https://img.shields.io/npm/v/pdfmake.svg?colorB=0E7FBF
|
|
10
|
-
[npm_url]: https://www.npmjs.com/package/pdfmake
|
|
11
|
-
|
|
12
|
-
[cdnjs_img]: https://img.shields.io/cdnjs/v/pdfmake.svg?colorB=0E7FBF
|
|
13
|
-
[cndjs_url]: https://cdnjs.com/libraries/pdfmake
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
PDF document generation library for server-side and client-side in pure JavaScript.
|
|
17
|
-
|
|
18
|
-
Check out [the playground](http://bpampuch.github.io/pdfmake/playground.html) and [examples](https://github.com/bpampuch/pdfmake/tree/master/examples).
|
|
19
|
-
|
|
20
|
-
### Features
|
|
21
|
-
|
|
22
|
-
* line-wrapping,
|
|
23
|
-
* text-alignments (left, right, centered, justified),
|
|
24
|
-
* numbered and bulleted lists,
|
|
25
|
-
* tables and columns
|
|
26
|
-
* auto/fixed/star-sized widths,
|
|
27
|
-
* col-spans and row-spans,
|
|
28
|
-
* headers automatically repeated in case of a page-break,
|
|
29
|
-
* images and vector graphics,
|
|
30
|
-
* convenient styling and style inheritance,
|
|
31
|
-
* page headers and footers:
|
|
32
|
-
* static or dynamic content,
|
|
33
|
-
* access to current page number and page count,
|
|
34
|
-
* background-layer,
|
|
35
|
-
* page dimensions and orientations,
|
|
36
|
-
* margins,
|
|
37
|
-
* document sections,
|
|
38
|
-
* custom page breaks,
|
|
39
|
-
* font embedding,
|
|
40
|
-
* support for complex, multi-level (nested) structures,
|
|
41
|
-
* table of contents,
|
|
42
|
-
* helper methods for opening/printing/downloading the generated PDF,
|
|
43
|
-
* setting of PDF metadata (e.g. author, subject).
|
|
44
|
-
|
|
45
|
-
## Documentation
|
|
46
|
-
|
|
47
|
-
**Documentation URL: https://pdfmake.github.io/docs/**
|
|
48
|
-
|
|
49
|
-
Source of documentation: https://github.com/pdfmake/docs **Improvements are welcome!**
|
|
50
|
-
|
|
51
|
-
## Building from sources
|
|
52
|
-
|
|
53
|
-
using npm:
|
|
54
|
-
```
|
|
55
|
-
git clone https://github.com/bpampuch/pdfmake.git
|
|
56
|
-
cd pdfmake
|
|
57
|
-
npm install
|
|
58
|
-
npm run build
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
using yarn:
|
|
62
|
-
```
|
|
63
|
-
git clone https://github.com/bpampuch/pdfmake.git
|
|
64
|
-
cd pdfmake
|
|
65
|
-
yarn
|
|
66
|
-
yarn run build
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## License
|
|
70
|
-
MIT
|
|
71
|
-
|
|
72
|
-
## Authors
|
|
73
|
-
* [@bpampuch](https://github.com/bpampuch) (founder)
|
|
74
|
-
* [@liborm85](https://github.com/liborm85)
|
|
75
|
-
|
|
76
|
-
pdfmake is based on a truly amazing library [pdfkit](https://github.com/devongovett/pdfkit) (credits to [@devongovett](https://github.com/devongovett)).
|
|
77
|
-
|
|
78
|
-
Thanks to all contributors.
|
|
1
|
+
# pdfmake [![Node.js CI][githubactions_img]][githubactions_url] [![GitHub][github_img]][github_url] [![npm][npm_img]][npm_url] [![CDNJS][cdnjs_img]][cndjs_url]
|
|
2
|
+
|
|
3
|
+
[githubactions_img]: https://github.com/bpampuch/pdfmake/actions/workflows/node.js.yml/badge.svg?branch=master
|
|
4
|
+
[githubactions_url]: https://github.com/bpampuch/pdfmake/actions
|
|
5
|
+
|
|
6
|
+
[github_img]: https://img.shields.io/github/release/bpampuch/pdfmake.svg?colorB=0E7FBF
|
|
7
|
+
[github_url]: https://github.com/bpampuch/pdfmake/releases/latest
|
|
8
|
+
|
|
9
|
+
[npm_img]: https://img.shields.io/npm/v/pdfmake.svg?colorB=0E7FBF
|
|
10
|
+
[npm_url]: https://www.npmjs.com/package/pdfmake
|
|
11
|
+
|
|
12
|
+
[cdnjs_img]: https://img.shields.io/cdnjs/v/pdfmake.svg?colorB=0E7FBF
|
|
13
|
+
[cndjs_url]: https://cdnjs.com/libraries/pdfmake
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
PDF document generation library for server-side and client-side in pure JavaScript.
|
|
17
|
+
|
|
18
|
+
Check out [the playground](http://bpampuch.github.io/pdfmake/playground.html) and [examples](https://github.com/bpampuch/pdfmake/tree/master/examples).
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* line-wrapping,
|
|
23
|
+
* text-alignments (left, right, centered, justified),
|
|
24
|
+
* numbered and bulleted lists,
|
|
25
|
+
* tables and columns
|
|
26
|
+
* auto/fixed/star-sized widths,
|
|
27
|
+
* col-spans and row-spans,
|
|
28
|
+
* headers automatically repeated in case of a page-break,
|
|
29
|
+
* images and vector graphics,
|
|
30
|
+
* convenient styling and style inheritance,
|
|
31
|
+
* page headers and footers:
|
|
32
|
+
* static or dynamic content,
|
|
33
|
+
* access to current page number and page count,
|
|
34
|
+
* background-layer,
|
|
35
|
+
* page dimensions and orientations,
|
|
36
|
+
* margins,
|
|
37
|
+
* document sections,
|
|
38
|
+
* custom page breaks,
|
|
39
|
+
* font embedding,
|
|
40
|
+
* support for complex, multi-level (nested) structures,
|
|
41
|
+
* table of contents,
|
|
42
|
+
* helper methods for opening/printing/downloading the generated PDF,
|
|
43
|
+
* setting of PDF metadata (e.g. author, subject).
|
|
44
|
+
|
|
45
|
+
## Documentation
|
|
46
|
+
|
|
47
|
+
**Documentation URL: https://pdfmake.github.io/docs/**
|
|
48
|
+
|
|
49
|
+
Source of documentation: https://github.com/pdfmake/docs **Improvements are welcome!**
|
|
50
|
+
|
|
51
|
+
## Building from sources
|
|
52
|
+
|
|
53
|
+
using npm:
|
|
54
|
+
```
|
|
55
|
+
git clone https://github.com/bpampuch/pdfmake.git
|
|
56
|
+
cd pdfmake
|
|
57
|
+
npm install
|
|
58
|
+
npm run build
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
using yarn:
|
|
62
|
+
```
|
|
63
|
+
git clone https://github.com/bpampuch/pdfmake.git
|
|
64
|
+
cd pdfmake
|
|
65
|
+
yarn
|
|
66
|
+
yarn run build
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
MIT
|
|
71
|
+
|
|
72
|
+
## Authors
|
|
73
|
+
* [@bpampuch](https://github.com/bpampuch) (founder)
|
|
74
|
+
* [@liborm85](https://github.com/liborm85)
|
|
75
|
+
|
|
76
|
+
pdfmake is based on a truly amazing library [pdfkit](https://github.com/devongovett/pdfkit) (credits to [@devongovett](https://github.com/devongovett)).
|
|
77
|
+
|
|
78
|
+
Thanks to all contributors.
|