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 +4 -1
- package/README.md +1 -1
- package/js/pdfkit.es.js +5 -5
- package/js/pdfkit.es.js.map +1 -1
- package/js/pdfkit.js +5 -5
- package/js/pdfkit.js.map +1 -1
- package/js/pdfkit.standalone.js +18070 -18072
- package/package.json +1 -1
- package/js/pdfkit.es5.js +0 -7493
- package/js/pdfkit.es5.js.map +0 -1
- package/js/pdfkit.esnext.js +0 -6782
- package/js/pdfkit.esnext.js.map +0 -1
package/CHANGELOG.md
CHANGED
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](
|
|
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.
|
|
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(
|
|
5274
|
+
this._addColorOutputIntent();
|
|
5275
5275
|
},
|
|
5276
|
-
_addColorOutputIntent(
|
|
5277
|
-
const iccProfile = fs.readFileSync(
|
|
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
|