@kittl/pdfkit 0.13.0 → 0.17.4
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/.yarn/install-state.gz +0 -0
- package/.yarn/releases/yarn-4.13.0.cjs +940 -0
- package/.yarnrc.yml +3 -0
- package/CHANGELOG.md +79 -0
- package/README.md +14 -7
- package/js/data/sRGB_IEC61966_2_1.icc +0 -0
- package/js/pdfkit.es.js +6447 -0
- package/js/pdfkit.es.js.map +1 -0
- package/js/pdfkit.es5.js +746 -1780
- package/js/pdfkit.es5.js.map +1 -1
- package/js/pdfkit.esnext.js +431 -1464
- package/js/pdfkit.esnext.js.map +1 -1
- package/js/pdfkit.js +2166 -2246
- package/js/pdfkit.js.map +1 -1
- package/js/pdfkit.standalone.js +34807 -34940
- package/js/virtual-fs.js +13 -30
- package/jsconfig.json +13 -0
- package/package.json +36 -36
- package/types/index.d.ts +1160 -0
- package/types/jest.custom-matchers.d.ts +28 -0
package/.yarnrc.yml
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,85 @@
|
|
|
2
2
|
|
|
3
3
|
### Unreleased
|
|
4
4
|
|
|
5
|
+
- Fix garbled text copying in Chrome/Edge for PDFs with >256 unique characters (#1659)
|
|
6
|
+
- Fix Link accessibility issues
|
|
7
|
+
- Fix Table Accessibility Issue: Operator CS/cs not allowed in this current state
|
|
8
|
+
- Fix Interlaced PNG with indexed transparency rendered incorrectly
|
|
9
|
+
- Fix SVG path parser incorrectly handle arc flags without separators
|
|
10
|
+
- Add pageLayout option to control how pages are displayed in PDF viewers
|
|
11
|
+
- Preserve existing PageMode instead of overwriting when adding outlines
|
|
12
|
+
- Add userUnit option for custom page units (PDF 1.6)
|
|
13
|
+
- Support outlines that jump to specific page positions with custom zoom level
|
|
14
|
+
- Add robust handling of null byte padding in JPEG images
|
|
15
|
+
- Replace outdated jpeg-exif with minimal implementation
|
|
16
|
+
- Replace outdated crypto-js with maintained small alternatives
|
|
17
|
+
- Fix issue with indentation with `indentAllLines: true` when a new page is created
|
|
18
|
+
|
|
19
|
+
### [v0.17.2] - 2025-08-30
|
|
20
|
+
|
|
21
|
+
- Fix rendering lists that spans across pages
|
|
22
|
+
|
|
23
|
+
### [v0.17.1] - 2025-05-02
|
|
24
|
+
|
|
25
|
+
- Fix null values in table cells rendering as `[object Object]`
|
|
26
|
+
- Fix further LineWrapper precision issues
|
|
27
|
+
- Optmize standard font handling. Less code, less memory usage
|
|
28
|
+
|
|
29
|
+
### [v0.17.0] - 2025-04-12
|
|
30
|
+
|
|
31
|
+
- Fix precision rounding issues in LineWrapper
|
|
32
|
+
- Fix fonts without a postscriptName
|
|
33
|
+
- Add support for dynamic sizing
|
|
34
|
+
- Add support for rotatable text
|
|
35
|
+
- Fix page cascade options when text overflows
|
|
36
|
+
- Add table generation
|
|
37
|
+
- Fix y position when using `image()` without x and y coordinates
|
|
38
|
+
- Improve Prettier configuration
|
|
39
|
+
|
|
40
|
+
### [v0.16.0] - 2024-12-29
|
|
41
|
+
|
|
42
|
+
- Update fontkit to 2.0
|
|
43
|
+
- Update linebreak to 1.1
|
|
44
|
+
- Add support for spot colors
|
|
45
|
+
- Add support to scale text horizontally
|
|
46
|
+
- Add an option to keep the indentation after a new line starts and allow to indent a whole paragraph/text element
|
|
47
|
+
- Add `Name` property for set custom icon for `note()`
|
|
48
|
+
- Fix sets tab order to "Structure" when a document is tagged
|
|
49
|
+
- Fix font cache collision for fonts with missing postscript name or bad TTF metadata or identical metadata for different fonts
|
|
50
|
+
- Fix for embedding fonts into PDF (font name must not contain spaces)
|
|
51
|
+
- Fix measuring text when OpenType features are passed in to .text()
|
|
52
|
+
|
|
53
|
+
### [v0.15.2] - 2024-12-15
|
|
54
|
+
|
|
55
|
+
- Fix index not counting when rendering ordered lists (#1517)
|
|
56
|
+
- Fix PDF/A3 compliance of attachments
|
|
57
|
+
- Fix CIDSet generation only for PDF/A1 subset
|
|
58
|
+
- Fix missing acroform font dictionary
|
|
59
|
+
- Fix modify time comparison check equality embedded files
|
|
60
|
+
|
|
61
|
+
### [v0.15.1] - 2024-10-30
|
|
62
|
+
|
|
63
|
+
- Fix browserify transform sRGB_IEC61966_2_1.icc file
|
|
64
|
+
- Fix time comparison check equality embedded files
|
|
65
|
+
|
|
66
|
+
### [v0.15.0] - 2024-03-23
|
|
67
|
+
|
|
68
|
+
- Add subset for PDF/UA
|
|
69
|
+
- Fix for line breaks in list items (#1486)
|
|
70
|
+
- Fix for soft hyphen not being replaced by visible hyphen if necessary (#457)
|
|
71
|
+
- Optimize output files by ignoring identity transforms
|
|
72
|
+
- Fix for Acroforms - setting an option to false will still apply the flag (#1495)
|
|
73
|
+
- Fix for text extraction in PDFium-based viewers due to invalid ToUnicodeMap (#1498)
|
|
74
|
+
- Remove deprecated `write` method
|
|
75
|
+
- Drop support for Node.js < 18 and for browsers released before 2020
|
|
76
|
+
|
|
77
|
+
### [v0.14.0] - 2023-11-09
|
|
78
|
+
|
|
79
|
+
- Add support for PDF/A-1b, PDF/A-1a, PDF/A-2b, PDF/A-2a, PDF/A-3b, PDF/A-3a
|
|
80
|
+
- Update crypto-js to v4.2.0 (properly fix security issue)
|
|
81
|
+
|
|
82
|
+
- Add support for EXIF orientation on JPEG images (#626 and #1353)
|
|
83
|
+
|
|
5
84
|
### [v0.13.0] - 2021-10-24
|
|
6
85
|
|
|
7
86
|
- Add tiling pattern support
|
package/README.md
CHANGED
|
@@ -18,9 +18,15 @@ You can also try out an interactive in-browser demo of PDFKit [here](http://pdfk
|
|
|
18
18
|
|
|
19
19
|
## Installation
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Use [npm](http://npmjs.org/) or [yarn](https://yarnpkg.com/) package manager. Just type the following command:
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
```bash
|
|
24
|
+
# with npm
|
|
25
|
+
npm install pdfkit
|
|
26
|
+
|
|
27
|
+
# with yarn
|
|
28
|
+
yarn add pdfkit
|
|
29
|
+
```
|
|
24
30
|
|
|
25
31
|
## Features
|
|
26
32
|
|
|
@@ -31,7 +37,7 @@ Installation uses the [npm](http://npmjs.org/) package manager. Just type the fo
|
|
|
31
37
|
- Transformations
|
|
32
38
|
- Linear and radial gradients
|
|
33
39
|
- Text
|
|
34
|
-
- Line wrapping
|
|
40
|
+
- Line wrapping (with soft hyphen recognition)
|
|
35
41
|
- Text alignments
|
|
36
42
|
- Bulleted lists
|
|
37
43
|
- Font embedding
|
|
@@ -40,6 +46,7 @@ Installation uses the [npm](http://npmjs.org/) package manager. Just type the fo
|
|
|
40
46
|
- See [fontkit](http://github.com/foliojs/fontkit) for more details on advanced glyph layout support.
|
|
41
47
|
- Image embedding
|
|
42
48
|
- Supports JPEG and PNG files (including indexed PNGs, and PNGs with transparency)
|
|
49
|
+
- Tables
|
|
43
50
|
- Annotations
|
|
44
51
|
- Links
|
|
45
52
|
- Notes
|
|
@@ -56,7 +63,7 @@ Installation uses the [npm](http://npmjs.org/) package manager. Just type the fo
|
|
|
56
63
|
## Coming soon!
|
|
57
64
|
|
|
58
65
|
- Patterns fills
|
|
59
|
-
- Higher level APIs for
|
|
66
|
+
- Higher level APIs for laying out content
|
|
60
67
|
- More performance optimizations
|
|
61
68
|
- Even more awesomeness, perhaps written by you! Please fork this repository and send me pull requests.
|
|
62
69
|
|
|
@@ -128,8 +135,8 @@ complex documents with a very small amount of code. For more, see the `demo` fol
|
|
|
128
135
|
|
|
129
136
|
There are three ways to use PDFKit in the browser:
|
|
130
137
|
|
|
131
|
-
- Use [Browserify](http://browserify.org/). See demo [source code](
|
|
132
|
-
- Use [webpack](https://webpack.js.org/). See [complete example](https://github.com/
|
|
138
|
+
- Use [Browserify](http://browserify.org/). See demo [source code](https://github.com/foliojs/pdfkit/blob/master/examples/browserify/browser.js) and [build script](https://github.com/foliojs/pdfkit/blob/master/package.json#L62)
|
|
139
|
+
- Use [webpack](https://webpack.js.org/). See [complete example](https://github.com/foliojs/pdfkit/blob/master/examples/webpack).
|
|
133
140
|
- Use prebuilt version. Distributed as `pdfkit.standalone.js` file in the [releases](https://github.com/foliojs/pdfkit/releases) or in the package `js` folder.
|
|
134
141
|
|
|
135
142
|
In addition to PDFKit, you'll need somewhere to stream the output to. HTML5 has a
|
|
@@ -168,7 +175,7 @@ stream.on('finish', function() {
|
|
|
168
175
|
|
|
169
176
|
You can see an interactive in-browser demo of PDFKit [here](http://pdfkit.org/demo/browser.html).
|
|
170
177
|
|
|
171
|
-
Note that in order to Browserify a project using PDFKit, you need to install the `brfs` module
|
|
178
|
+
Note that in order to Browserify a project using PDFKit, you need to install the `brfs` module,
|
|
172
179
|
which is used to load built-in font data into the package. It is listed as a `devDependency` in
|
|
173
180
|
PDFKit's `package.json`, so it isn't installed by default for Node users.
|
|
174
181
|
If you forget to install it, Browserify will print an error message.
|
|
Binary file
|