pdfkit 0.15.0 → 0.15.1

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 CHANGED
@@ -1,6 +1,9 @@
1
1
  ## pdfkit changelog
2
2
 
3
- ### Unreleased
3
+ ### [v0.15.1] - 2024-10-30
4
+
5
+ - Fix browserify transform sRGB_IEC61966_2_1.icc file
6
+ - Fix time comparison check equality embedded files
4
7
 
5
8
  ### [v0.15.0] - 2024-03-23
6
9
 
package/README.md CHANGED
@@ -129,7 +129,7 @@ complex documents with a very small amount of code. For more, see the `demo` fol
129
129
  There are three ways to use PDFKit in the browser:
130
130
 
131
131
  - Use [Browserify](http://browserify.org/). See demo [source code](demo/browser.js) and [build script](https://github.com/foliojs/pdfkit/blob/master/package.json#L56)
132
- - Use [webpack](https://webpack.js.org/). See [complete example](https://github.com/blikblum/pdfkit-webpack-example).
132
+ - Use [webpack](https://webpack.js.org/). See [complete example](examples/webpack).
133
133
  - 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
134
 
135
135
  In addition to PDFKit, you'll need somewhere to stream the output to. HTML5 has a
package/js/pdfkit.es.js CHANGED
@@ -4958,7 +4958,7 @@ var AcroFormMixin = {
4958
4958
  _fieldDict(name, type) {
4959
4959
  let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4960
4960
  if (!this._acroform) {
4961
- throw new Error('Call document.initForms() method before adding form elements to document');
4961
+ throw new Error('Call document.initForm() method before adding form elements to document');
4962
4962
  }
4963
4963
  let opts = Object.assign({}, options);
4964
4964
  if (type !== null) {
@@ -5255,7 +5255,7 @@ var AttachmentsMixin = {
5255
5255
 
5256
5256
  /** check two embedded file metadata objects for equality */
5257
5257
  function isEqual(a, b) {
5258
- return a.Subtype === b.Subtype && a.Params.CheckSum.toString() === b.Params.CheckSum.toString() && a.Params.Size === b.Params.Size && a.Params.CreationDate === b.Params.CreationDate && a.Params.ModDate === b.Params.ModDate;
5258
+ return a.Subtype === b.Subtype && a.Params.CheckSum.toString() === b.Params.CheckSum.toString() && a.Params.Size === b.Params.Size && a.Params.CreationDate.getTime() === b.Params.CreationDate.getTime() && a.Params.ModDate.getTime() === b.Params.ModDate.getTime();
5259
5259
  }
5260
5260
 
5261
5261
  var PDFA = {
@@ -5271,10 +5271,10 @@ var PDFA = {
5271
5271
  },
5272
5272
  endSubset() {
5273
5273
  this._addPdfaMetadata();
5274
- this._addColorOutputIntent(`${__dirname}/data/sRGB_IEC61966_2_1.icc`);
5274
+ this._addColorOutputIntent();
5275
5275
  },
5276
- _addColorOutputIntent(pICCPath) {
5277
- const iccProfile = fs.readFileSync(pICCPath);
5276
+ _addColorOutputIntent() {
5277
+ const iccProfile = fs.readFileSync(`${__dirname}/data/sRGB_IEC61966_2_1.icc`);
5278
5278
  const colorProfileRef = this.ref({
5279
5279
  Length: iccProfile.length,
5280
5280
  N: 3