pdfmake 0.3.0-beta.8 → 0.3.0
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 +7 -40
- package/LICENSE +1 -1
- package/README.md +78 -85
- package/build/pdfmake.js +60308 -68400
- 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_fonts.js +4 -4
- package/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/js/3rd-party/svg-to-pdfkit/source.js +3626 -0
- package/js/3rd-party/svg-to-pdfkit.js +7 -0
- package/js/DocMeasure.js +645 -0
- package/js/DocPreprocessor.js +253 -0
- package/js/DocumentContext.js +305 -0
- package/js/ElementWriter.js +354 -0
- package/js/LayoutBuilder.js +1105 -0
- package/js/Line.js +105 -0
- package/js/OutputDocument.js +64 -0
- package/js/OutputDocumentServer.js +22 -0
- package/js/PDFDocument.js +144 -0
- package/js/PageElementWriter.js +155 -0
- package/js/PageSize.js +74 -0
- package/js/Printer.js +291 -0
- package/js/Renderer.js +383 -0
- package/js/SVGMeasure.js +69 -0
- package/js/StyleContextStack.js +168 -0
- package/js/TableProcessor.js +548 -0
- package/js/TextBreaker.js +166 -0
- package/js/TextDecorator.js +143 -0
- package/js/TextInlines.js +206 -0
- package/js/URLResolver.js +43 -0
- package/js/base.js +52 -0
- package/js/browser-extensions/OutputDocumentBrowser.js +81 -0
- package/js/browser-extensions/fonts/Roboto.js +38 -0
- package/js/browser-extensions/index.js +53 -0
- package/js/browser-extensions/pdfMake.js +3 -0
- package/js/browser-extensions/standard-fonts/Courier.js +38 -0
- package/js/browser-extensions/standard-fonts/Helvetica.js +38 -0
- package/js/browser-extensions/standard-fonts/Symbol.js +23 -0
- package/js/browser-extensions/standard-fonts/Times.js +38 -0
- package/js/browser-extensions/standard-fonts/ZapfDingbats.js +23 -0
- package/js/browser-extensions/virtual-fs-cjs.js +3 -0
- package/js/columnCalculator.js +148 -0
- package/js/helpers/node.js +98 -0
- package/js/helpers/tools.js +46 -0
- package/js/helpers/variableType.js +59 -0
- package/js/index.js +15 -0
- package/js/qrEnc.js +721 -0
- package/js/standardPageSizes.js +56 -0
- package/js/tableLayouts.js +98 -0
- package/js/virtual-fs.js +60 -0
- package/package.json +25 -24
- package/src/DocMeasure.js +28 -7
- package/src/DocPreprocessor.js +25 -6
- package/src/DocumentContext.js +62 -33
- package/src/ElementWriter.js +30 -7
- package/src/LayoutBuilder.js +557 -120
- package/src/OutputDocument.js +23 -37
- package/src/OutputDocumentServer.js +6 -11
- package/src/PDFDocument.js +1 -1
- package/src/PageElementWriter.js +21 -2
- package/src/Printer.js +134 -131
- package/src/Renderer.js +13 -15
- package/src/SVGMeasure.js +2 -2
- package/src/StyleContextStack.js +7 -44
- package/src/TableProcessor.js +62 -22
- package/src/TextBreaker.js +24 -5
- package/src/TextInlines.js +1 -1
- package/src/URLResolver.js +24 -58
- package/src/base.js +1 -1
- package/src/browser-extensions/OutputDocumentBrowser.js +33 -71
- package/src/browser-extensions/index.js +3 -3
- package/src/browser-extensions/pdfMake.js +0 -14
- package/src/browser-extensions/standard-fonts/Courier.js +4 -4
- package/src/browser-extensions/standard-fonts/Helvetica.js +4 -4
- package/src/browser-extensions/standard-fonts/Symbol.js +1 -1
- package/src/browser-extensions/standard-fonts/Times.js +4 -4
- package/src/browser-extensions/standard-fonts/ZapfDingbats.js +1 -1
- package/src/columnCalculator.js +24 -3
- package/src/helpers/tools.js +5 -0
- package/src/helpers/variableType.js +11 -0
- package/src/index.js +1 -1
- package/standard-fonts/Helvetica.js +0 -1
- package/src/browser-extensions/URLBrowserResolver.js +0 -84
package/CHANGELOG.md
CHANGED
|
@@ -1,49 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.3.0
|
|
4
|
-
|
|
5
|
-
- Removed unused brfs dependency
|
|
6
|
-
|
|
7
|
-
## 0.3.0-beta.7 - 2024-01-01
|
|
8
|
-
|
|
9
|
-
- Minimal supported version Node.js 16 LTS
|
|
10
|
-
- Added padding option for QR code
|
|
11
|
-
- Allow the document language to be specified
|
|
12
|
-
- Fixed cover image size inside table
|
|
13
|
-
- Fixed "Cannot read properties of undefined (reading 'bottomMost')" if table contains too few rows
|
|
14
|
-
- Fixed invalid source-maps in builded js file
|
|
15
|
-
|
|
16
|
-
## 0.3.0-beta.6 - 2023-11-09
|
|
17
|
-
|
|
18
|
-
- Update pdfkit to 0.14.0
|
|
19
|
-
- Update Roboto font (version 3.008)
|
|
20
|
-
|
|
21
|
-
## 0.3.0-beta.5 - 2023-02-19
|
|
22
|
-
|
|
23
|
-
- Fixed document buffer size. Node.js 18+ allow max 1 GiB.
|
|
24
|
-
|
|
25
|
-
## 0.3.0-beta.4 - 2022-12-17
|
|
26
|
-
|
|
27
|
-
- Minimal supported version Node.js 14 LTS
|
|
28
|
-
- Fixed theoretical vulnerability CVE-2022-46161 (**It was never part of version released as npm package or cdnjs or bower or packagist!**)
|
|
29
|
-
|
|
30
|
-
## 0.3.0-beta.3 - 2022-10-09
|
|
31
|
-
|
|
32
|
-
- Updated Roboto font (version 3.005)
|
|
33
|
-
- Fixed calculating auto page height
|
|
34
|
-
- Fixed TrueType Collection loading from URL
|
|
35
|
-
- Fixed refetching fonts from URL
|
|
36
|
-
|
|
37
|
-
## 0.3.0-beta.2 - 2022-04-01
|
|
38
|
-
|
|
39
|
-
- Attachments embedding
|
|
40
|
-
- Support passing headers to request for loading font files and images via URL adresses
|
|
41
|
-
|
|
42
|
-
## 0.3.0-beta.1 - 2022-01-01
|
|
3
|
+
## 0.3.0 - 2026-01-01
|
|
43
4
|
|
|
5
|
+
- Reverted to the original `pdfkit` package, moving away from `@foliojs-fork`
|
|
6
|
+
- Drop support Internet Explorer 11 (Microsoft will not support from 2022)
|
|
7
|
+
- Minimal supported version Node.js 20 LTS
|
|
44
8
|
- Port code base to ES6+
|
|
45
9
|
- Unify interface for node and browser **(breaking change)**
|
|
46
10
|
- All methods return promise instead of using callback **(breaking change)**
|
|
47
11
|
- Change including virtual font storage in client-side **(breaking change)**
|
|
48
12
|
- Change parameters of `pageBreakBefore` function **(breaking change)**
|
|
49
13
|
- Support for loading font files and images via URL adresses (https:// or http:// protocol) in Node.js (client and server side now)
|
|
14
|
+
- Used fetch API for downloading fonts and images
|
|
15
|
+
- Attachments embedding
|
|
16
|
+
- Added `section` node
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,85 +1,78 @@
|
|
|
1
|
-
# pdfmake [![Node.js CI][githubactions_img]][githubactions_url] [![GitHub][github_img]][github_url] [![npm][npm_img]][npm_url] [![
|
|
2
|
-
|
|
3
|
-
[githubactions_img]: https://github.com/bpampuch/pdfmake/workflows/
|
|
4
|
-
[githubactions_url]: https://github.com/bpampuch/pdfmake/actions
|
|
5
|
-
|
|
6
|
-
[github_img]: https://img.shields.io/github/release/bpampuch/pdfmake.svg
|
|
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
|
-
[
|
|
13
|
-
[
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
## Authors
|
|
80
|
-
* [@bpampuch](https://github.com/bpampuch) (founder)
|
|
81
|
-
* [@liborm85](https://github.com/liborm85)
|
|
82
|
-
|
|
83
|
-
pdfmake is based on a truly amazing library [pdfkit](https://github.com/devongovett/pdfkit) (credits to [@devongovett](https://github.com/devongovett)).
|
|
84
|
-
|
|
85
|
-
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.
|