diff --git a/dist/jspdf.debug.js b/dist/jspdf.debug.js
index 4c0736d16..2404e4f72 100644
--- a/dist/jspdf.debug.js
+++ b/dist/jspdf.debug.js
@@ -1,13 +1,12 @@
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
- (global = global || self, factory(global.jsPDF = {}));
-}(this, function (exports) { 'use strict';
+(function (factory) {
+ typeof define === 'function' && define.amd ? define(factory) :
+ factory();
+}(function () { 'use strict';
/** @license
* jsPDF - PDF Document creation from JavaScript
- * Version 1.5.2 Built on 2018-12-20T15:49:00.470Z
- * CommitID 81f5c40ca4
+ * Version 1.5.3 Built on 2018-12-26T22:17:53.465Z
+ * CommitID 5533a7bbbc
*
* Copyright (c) 2010-2016 James Hall , https://github.com/MrRio/jsPDF
* 2010 Aaron Spike, https://github.com/acspike
@@ -47,10 +46,10 @@
return _typeof(obj);
}
- /**
- * JavaScript Polyfill functions for jsPDF
- * Collected from public resources by
- * https://github.com/diegocr
+ /**
+ * JavaScript Polyfill functions for jsPDF
+ * Collected from public resources by
+ * https://github.com/diegocr
*/
(function (global) {
if (_typeof(global.console) !== "object") {
@@ -358,327 +357,37 @@
// while `this` is nsIContentFrameMessageManager
// with an attribute `content` that corresponds to the window
- (function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory() : typeof define === 'function' && define.amd ? define(factory) : factory();
- })(window, function () {
- /**
- * @this {Promise}
- */
-
- function finallyConstructor(callback) {
- var constructor = this.constructor;
- return this.then(function (value) {
- return constructor.resolve(callback()).then(function () {
- return value;
- });
- }, function (reason) {
- return constructor.resolve(callback()).then(function () {
- return constructor.reject(reason);
- });
- });
- } // Store setTimeout reference so promise-polyfill will be unaffected by
- // other code modifying setTimeout (like sinon.useFakeTimers())
-
-
- var setTimeoutFunc = setTimeout;
-
- function noop() {} // Polyfill for Function.prototype.bind
-
-
- function bind(fn, thisArg) {
- return function () {
- fn.apply(thisArg, arguments);
- };
- }
- /**
- * @constructor
- * @param {Function} fn
- */
-
-
- function Promise(fn) {
- if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');
- if (typeof fn !== 'function') throw new TypeError('not a function');
- /** @type {!number} */
-
- this._state = 0;
- /** @type {!boolean} */
-
- this._handled = false;
- /** @type {Promise|undefined} */
-
- this._value = undefined;
- /** @type {!Array} */
-
- this._deferreds = [];
- doResolve(fn, this);
- }
-
- function handle(self, deferred) {
- while (self._state === 3) {
- self = self._value;
- }
-
- if (self._state === 0) {
- self._deferreds.push(deferred);
-
- return;
- }
-
- self._handled = true;
-
- Promise._immediateFn(function () {
- var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
-
- if (cb === null) {
- (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
- return;
- }
-
- var ret;
-
- try {
- ret = cb(self._value);
- } catch (e) {
- reject(deferred.promise, e);
- return;
- }
-
- resolve(deferred.promise, ret);
- });
- }
-
- function resolve(self, newValue) {
- try {
- // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
- if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');
-
- if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
- var then = newValue.then;
-
- if (newValue instanceof Promise) {
- self._state = 3;
- self._value = newValue;
- finale(self);
- return;
- } else if (typeof then === 'function') {
- doResolve(bind(then, newValue), self);
- return;
- }
- }
-
- self._state = 1;
- self._value = newValue;
- finale(self);
- } catch (e) {
- reject(self, e);
- }
- }
-
- function reject(self, newValue) {
- self._state = 2;
- self._value = newValue;
- finale(self);
- }
-
- function finale(self) {
- if (self._state === 2 && self._deferreds.length === 0) {
- Promise._immediateFn(function () {
- if (!self._handled) {
- Promise._unhandledRejectionFn(self._value);
- }
- });
- }
-
- for (var i = 0, len = self._deferreds.length; i < len; i++) {
- handle(self, self._deferreds[i]);
- }
-
- self._deferreds = null;
- }
- /**
- * @constructor
- */
-
-
- function Handler(onFulfilled, onRejected, promise) {
- this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
- this.onRejected = typeof onRejected === 'function' ? onRejected : null;
- this.promise = promise;
- }
- /**
- * Take a potentially misbehaving resolver function and make sure
- * onFulfilled and onRejected are only called once.
- *
- * Makes no guarantees about asynchrony.
- */
-
-
- function doResolve(fn, self) {
- var done = false;
-
- try {
- fn(function (value) {
- if (done) return;
- done = true;
- resolve(self, value);
- }, function (reason) {
- if (done) return;
- done = true;
- reject(self, reason);
- });
- } catch (ex) {
- if (done) return;
- done = true;
- reject(self, ex);
- }
- }
-
- Promise.prototype['catch'] = function (onRejected) {
- return this.then(null, onRejected);
- };
-
- Promise.prototype.then = function (onFulfilled, onRejected) {
- // @ts-ignore
- var prom = new this.constructor(noop);
- handle(this, new Handler(onFulfilled, onRejected, prom));
- return prom;
- };
-
- Promise.prototype['finally'] = finallyConstructor;
-
- Promise.all = function (arr) {
- return new Promise(function (resolve, reject) {
- if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');
- var args = Array.prototype.slice.call(arr);
- if (args.length === 0) return resolve([]);
- var remaining = args.length;
-
- function res(i, val) {
- try {
- if (val && (typeof val === 'object' || typeof val === 'function')) {
- var then = val.then;
-
- if (typeof then === 'function') {
- then.call(val, function (val) {
- res(i, val);
- }, reject);
- return;
- }
- }
-
- args[i] = val;
-
- if (--remaining === 0) {
- resolve(args);
- }
- } catch (ex) {
- reject(ex);
- }
- }
-
- for (var i = 0; i < args.length; i++) {
- res(i, args[i]);
- }
- });
- };
-
- Promise.resolve = function (value) {
- if (value && typeof value === 'object' && value.constructor === Promise) {
- return value;
- }
-
- return new Promise(function (resolve) {
- resolve(value);
- });
- };
-
- Promise.reject = function (value) {
- return new Promise(function (resolve, reject) {
- reject(value);
- });
- };
-
- Promise.race = function (values) {
- return new Promise(function (resolve, reject) {
- for (var i = 0, len = values.length; i < len; i++) {
- values[i].then(resolve, reject);
- }
- });
- }; // Use polyfill for setImmediate for performance gains
-
-
- Promise._immediateFn = typeof setImmediate === 'function' && function (fn) {
- setImmediate(fn);
- } || function (fn) {
- setTimeoutFunc(fn, 0);
- };
-
- Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
- if (typeof console !== 'undefined' && console) {
- console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
- }
- };
- /** @suppress {undefinedVars} */
-
-
- var globalNS = function () {
- // the only reliable means to get the global object is
- // `Function('return this')()`
- // However, this causes CSP violations in Chrome apps.
- if (typeof self !== 'undefined') {
- return self;
- }
-
- if (typeof window !== 'undefined') {
- return window;
- }
-
- if (typeof global !== 'undefined') {
- return global;
- }
-
- throw new Error('unable to locate global object');
- }();
-
- if (!('Promise' in globalNS)) {
- globalNS['Promise'] = Promise;
- } else if (!globalNS.Promise.prototype['finally']) {
- globalNS.Promise.prototype['finally'] = finallyConstructor;
- }
- });
-
- /**
- * Creates new jsPDF document object instance.
- * @name jsPDF
- * @class
- * @param orientation {string/Object} Orientation of the first page. Possible values are "portrait" or "landscape" (or shortcuts "p" (Default), "l").
- * Can also be an options object.
- * @param unit {string} Measurement unit to be used when coordinates are specified.
- * Possible values are "pt" (points), "mm" (Default), "cm", "in" or "px".
- * @param format {string/Array} The format of the first page. Can be:- a0 - a10
- b0 - b10
- c0 - c10
- dl
- letter
- government-letter
- legal
- junior-legal
- ledger
- tabloid
- credit-card
- * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
- * @returns {jsPDF} jsPDF-instance
- * @description
- * If the first parameter (orientation) is an object, it will be interpreted as an object of named parameters
- * ```
- * {
- * orientation: 'p',
- * unit: 'mm',
- * format: 'a4',
- * hotfixes: [] // an array of hotfix strings to enable
- * }
- * ```
+ /**
+ * Creates new jsPDF document object instance.
+ * @name jsPDF
+ * @class
+ * @param orientation {string/Object} Orientation of the first page. Possible values are "portrait" or "landscape" (or shortcuts "p" (Default), "l").
+ * Can also be an options object.
+ * @param unit {string} Measurement unit to be used when coordinates are specified.
+ * Possible values are "pt" (points), "mm" (Default), "cm", "in" or "px".
+ * @param format {string/Array} The format of the first page. Can be:- a0 - a10
- b0 - b10
- c0 - c10
- dl
- letter
- government-letter
- legal
- junior-legal
- ledger
- tabloid
- credit-card
+ * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
+ * @returns {jsPDF} jsPDF-instance
+ * @description
+ * If the first parameter (orientation) is an object, it will be interpreted as an object of named parameters
+ * ```
+ * {
+ * orientation: 'p',
+ * unit: 'mm',
+ * format: 'a4',
+ * hotfixes: [] // an array of hotfix strings to enable
+ * }
+ * ```
*/
var jsPDF = function (global) {
- /**
- * jsPDF's Internal PubSub Implementation.
- * Backward compatible rewritten on 2014 by
- * Diego Casorran, https://github.com/diegocr
- *
- * @class
- * @name PubSub
- * @ignore
+ /**
+ * jsPDF's Internal PubSub Implementation.
+ * Backward compatible rewritten on 2014 by
+ * Diego Casorran, https://github.com/diegocr
+ *
+ * @class
+ * @name PubSub
+ * @ignore
*/
function PubSub(context) {
@@ -747,9 +456,9 @@
return topics;
};
}
- /**
- * @constructor
- * @private
+ /**
+ * @constructor
+ * @private
*/
@@ -875,13 +584,13 @@
fileId = value;
return fileId;
};
- /**
- * @name setFileId
- * @memberOf jsPDF
- * @function
- * @instance
- * @param {string} value GUID.
- * @returns {jsPDF}
+ /**
+ * @name setFileId
+ * @memberOf jsPDF
+ * @function
+ * @instance
+ * @param {string} value GUID.
+ * @returns {jsPDF}
*/
@@ -889,13 +598,13 @@
setFileId(value);
return this;
};
- /**
- * @name getFileId
- * @memberOf jsPDF
- * @function
- * @instance
- *
- * @returns {string} GUID.
+ /**
+ * @name getFileId
+ * @memberOf jsPDF
+ * @function
+ * @instance
+ *
+ * @returns {string} GUID.
*/
@@ -958,13 +667,13 @@
return result;
};
- /**
- * @name setCreationDate
- * @memberOf jsPDF
- * @function
- * @instance
- * @param {Object} date
- * @returns {jsPDF}
+ /**
+ * @name setCreationDate
+ * @memberOf jsPDF
+ * @function
+ * @instance
+ * @param {Object} date
+ * @returns {jsPDF}
*/
@@ -972,13 +681,13 @@
setCreationDate(date);
return this;
};
- /**
- * @name getCreationDate
- * @memberOf jsPDF
- * @function
- * @instance
- * @param {Object} type
- * @returns {Object}
+ /**
+ * @name getCreationDate
+ * @memberOf jsPDF
+ * @function
+ * @instance
+ * @param {Object} type
+ * @returns {Object}
*/
@@ -1048,29 +757,29 @@
};
var activeFontSize = options.fontSize || 16;
- /**
- * Sets font size for upcoming text elements.
- *
- * @param {number} size Font size in points.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setFontSize
+ /**
+ * Sets font size for upcoming text elements.
+ *
+ * @param {number} size Font size in points.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setFontSize
*/
var setFontSize = API.__private__.setFontSize = API.setFontSize = function (size) {
activeFontSize = size;
return this;
};
- /**
- * Gets the fontsize for upcoming text elements.
- *
- * @function
- * @instance
- * @returns {number}
- * @memberOf jsPDF
- * @name getFontSize
+ /**
+ * Gets the fontsize for upcoming text elements.
+ *
+ * @function
+ * @instance
+ * @returns {number}
+ * @memberOf jsPDF
+ * @name getFontSize
*/
@@ -1079,29 +788,29 @@
};
var R2L = options.R2L || false;
- /**
- * Set value of R2L functionality.
- *
- * @param {boolean} value
- * @function
- * @instance
- * @returns {jsPDF} jsPDF-instance
- * @memberOf jsPDF
- * @name setR2L
+ /**
+ * Set value of R2L functionality.
+ *
+ * @param {boolean} value
+ * @function
+ * @instance
+ * @returns {jsPDF} jsPDF-instance
+ * @memberOf jsPDF
+ * @name setR2L
*/
var setR2L = API.__private__.setR2L = API.setR2L = function (value) {
R2L = value;
return this;
};
- /**
- * Get value of R2L functionality.
- *
- * @function
- * @instance
- * @returns {boolean} jsPDF-instance
- * @memberOf jsPDF
- * @name getR2L
+ /**
+ * Get value of R2L functionality.
+ *
+ * @function
+ * @instance
+ * @returns {boolean} jsPDF-instance
+ * @memberOf jsPDF
+ * @name getR2L
*/
@@ -1160,30 +869,30 @@
var getLayoutMode = API.__private__.getLayoutMode = function () {
return layoutMode;
};
- /**
- * Set the display mode options of the page like zoom and layout.
- *
- * @name setDisplayMode
- * @memberOf jsPDF
- * @function
- * @instance
- * @param {integer|String} zoom You can pass an integer or percentage as
- * a string. 2 will scale the document up 2x, '200%' will scale up by the
- * same amount. You can also set it to 'fullwidth', 'fullheight',
- * 'fullpage', or 'original'.
- *
- * Only certain PDF readers support this, such as Adobe Acrobat.
- *
- * @param {string} layout Layout mode can be: 'continuous' - this is the
- * default continuous scroll. 'single' - the single page mode only shows one
- * page at a time. 'twoleft' - two column left mode, first page starts on
- * the left, and 'tworight' - pages are laid out in two columns, with the
- * first page on the right. This would be used for books.
- * @param {string} pmode 'UseOutlines' - it shows the
- * outline of the document on the left. 'UseThumbs' - shows thumbnails along
- * the left. 'FullScreen' - prompts the user to enter fullscreen mode.
- *
- * @returns {jsPDF}
+ /**
+ * Set the display mode options of the page like zoom and layout.
+ *
+ * @name setDisplayMode
+ * @memberOf jsPDF
+ * @function
+ * @instance
+ * @param {integer|String} zoom You can pass an integer or percentage as
+ * a string. 2 will scale the document up 2x, '200%' will scale up by the
+ * same amount. You can also set it to 'fullwidth', 'fullheight',
+ * 'fullpage', or 'original'.
+ *
+ * Only certain PDF readers support this, such as Adobe Acrobat.
+ *
+ * @param {string} layout Layout mode can be: 'continuous' - this is the
+ * default continuous scroll. 'single' - the single page mode only shows one
+ * page at a time. 'twoleft' - two column left mode, first page starts on
+ * the left, and 'tworight' - pages are laid out in two columns, with the
+ * first page on the right. This would be used for books.
+ * @param {string} pmode 'UseOutlines' - it shows the
+ * outline of the document on the left. 'UseThumbs' - shows thumbnails along
+ * the left. 'FullScreen' - prompts the user to enter fullscreen mode.
+ *
+ * @returns {jsPDF}
*/
@@ -1213,15 +922,15 @@
var getDocumentProperties = API.__private__.getDocumentProperties = function (properties) {
return documentProperties;
};
- /**
- * Adds a properties to the PDF document.
- *
- * @param {Object} A property_name-to-property_value object structure.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setDocumentProperties
+ /**
+ * Adds a properties to the PDF document.
+ *
+ * @param {Object} A property_name-to-property_value object structure.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setDocumentProperties
*/
@@ -1511,7 +1220,7 @@
out('<a0 - a10b0 - b10c0 - c10dllettergovernment-letterlegaljunior-legalledgertabloidcredit-card
- * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
- * @param orientation {string} Orientation of the new page. Possible values are "portrait" or "landscape" (or shortcuts "p" (Default), "l").
- * @function
- * @instance
- * @returns {jsPDF}
- *
- * @memberOf jsPDF
- * @name addPage
+ /**
+ * Adds (and transfers the focus to) new page to the PDF document.
+ * @param format {String/Array} The format of the new page. Can be: - a0 - a10
- b0 - b10
- c0 - c10
- dl
- letter
- government-letter
- legal
- junior-legal
- ledger
- tabloid
- credit-card
+ * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
+ * @param orientation {string} Orientation of the new page. Possible values are "portrait" or "landscape" (or shortcuts "p" (Default), "l").
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ *
+ * @memberOf jsPDF
+ * @name addPage
*/
@@ -2399,22 +2114,22 @@
return this;
};
- /**
- * Adds (and transfers the focus to) new page to the PDF document.
- * @function
- * @instance
- * @returns {jsPDF}
- *
- * @memberOf jsPDF
- * @name setPage
- * @param {number} page Switch the active page to the page number specified.
- * @example
- * doc = jsPDF()
- * doc.addPage()
- * doc.addPage()
- * doc.text('I am on page 3', 10, 10)
- * doc.setPage(1)
- * doc.text('I am on page 1', 10, 10)
+ /**
+ * Adds (and transfers the focus to) new page to the PDF document.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ *
+ * @memberOf jsPDF
+ * @name setPage
+ * @param {number} page Switch the active page to the page number specified.
+ * @example
+ * doc = jsPDF()
+ * doc.addPage()
+ * doc.addPage()
+ * doc.text('I am on page 3', 10, 10)
+ * doc.setPage(1)
+ * doc.text('I am on page 1', 10, 10)
*/
@@ -2423,14 +2138,14 @@
return this;
};
- /**
- * @name insertPage
- * @memberOf jsPDF
- *
- * @function
- * @instance
- * @param {Object} beforePage
- * @returns {jsPDF}
+ /**
+ * @name insertPage
+ * @memberOf jsPDF
+ *
+ * @function
+ * @instance
+ * @param {Object} beforePage
+ * @returns {jsPDF}
*/
@@ -2439,14 +2154,14 @@
this.movePage(currentPage, beforePage);
return this;
};
- /**
- * @name movePage
- * @memberOf jsPDF
- * @function
- * @instance
- * @param {Object} targetPage
- * @param {Object} beforePage
- * @returns {jsPDF}
+ /**
+ * @name movePage
+ * @memberOf jsPDF
+ * @function
+ * @instance
+ * @param {Object} targetPage
+ * @param {Object} beforePage
+ * @returns {jsPDF}
*/
@@ -2479,13 +2194,13 @@
return this;
};
- /**
- * Deletes a page from the PDF.
- * @name deletePage
- * @memberOf jsPDF
- * @function
- * @instance
- * @returns {jsPDF}
+ /**
+ * Deletes a page from the PDF.
+ * @name deletePage
+ * @memberOf jsPDF
+ * @function
+ * @instance
+ * @returns {jsPDF}
*/
@@ -2494,43 +2209,43 @@
return this;
};
- /**
- * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.
- *
- * @function
- * @instance
- * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.
- * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
- * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
- * @param {Object} [options] - Collection of settings signaling how the text must be encoded.
- * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.
- * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle.
- * @param {string} [options.angle=0] - Rotate the text counterclockwise. Expects the angle in degree.
- * @param {string} [options.charSpace=0] - The space between each letter.
- * @param {string} [options.lineHeightFactor=1.15] - The lineheight of each line.
- * @param {string} [options.flags] - Flags for to8bitStream.
- * @param {string} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.
- * @param {string} [options.flags.autoencode=true] - Autoencode the Text.
- * @param {string} [options.maxWidth=0] - Split the text by given width, 0 = no split.
- * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name text
+ /**
+ * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.
+ *
+ * @function
+ * @instance
+ * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.
+ * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
+ * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+ * @param {Object} [options] - Collection of settings signaling how the text must be encoded.
+ * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.
+ * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle.
+ * @param {string} [options.angle=0] - Rotate the text counterclockwise. Expects the angle in degree.
+ * @param {string} [options.charSpace=0] - The space between each letter.
+ * @param {string} [options.lineHeightFactor=1.15] - The lineheight of each line.
+ * @param {string} [options.flags] - Flags for to8bitStream.
+ * @param {string} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.
+ * @param {string} [options.flags.autoencode=true] - Autoencode the Text.
+ * @param {string} [options.maxWidth=0] - Split the text by given width, 0 = no split.
+ * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name text
*/
var text = API.__private__.text = API.text = function (text, x, y, options) {
- /**
- * Inserts something like this into PDF
- * BT
- * /F1 16 Tf % Font name + size
- * 16 TL % How many units down for next line in multiline text
- * 0 g % color
- * 28.35 813.54 Td % position
- * (line one) Tj
- * T* (line two) Tj
- * T* (line three) Tj
- * ET
+ /**
+ * Inserts something like this into PDF
+ * BT
+ * /F1 16 Tf % Font name + size
+ * 16 TL % How many units down for next line in multiline text
+ * 0 g % color
+ * 28.35 813.54 Td % position
+ * (line one) Tj
+ * T* (line two) Tj
+ * T* (line three) Tj
+ * ET
*/
//backwardsCompatibility
var tmp; // Pre-August-2012 the order of arguments was function(x, y, text, flags)
@@ -3019,19 +2734,19 @@
usedFonts[activeFontKey] = true;
return scope;
};
- /**
- * Letter spacing method to print text with gaps
- *
- * @function
- * @instance
- * @param {String|Array} text String to be added to the page.
- * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
- * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
- * @param {number} spacing Spacing (in units declared at inception)
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name lstext
- * @deprecated We'll be removing this function. It doesn't take character width into account.
+ /**
+ * Letter spacing method to print text with gaps
+ *
+ * @function
+ * @instance
+ * @param {String|Array} text String to be added to the page.
+ * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {number} spacing Spacing (in units declared at inception)
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name lstext
+ * @deprecated We'll be removing this function. It doesn't take character width into account.
*/
@@ -3041,15 +2756,15 @@
charSpace: charSpace
});
};
- /**
- *
- * @name clip
- * @function
- * @instance
- * @param {string} rule
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @description All .clip() after calling drawing ops with a style argument of null.
+ /**
+ *
+ * @name clip
+ * @function
+ * @instance
+ * @param {string} rule
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @description All .clip() after calling drawing ops with a style argument of null.
*/
@@ -3067,11 +2782,11 @@
out('n');
};
- /**
- * This fixes the previous function clip(). Perhaps the 'stroke path' hack was due to the missing 'n' instruction?
- * We introduce the fixed version so as to not break API.
- * @param fillRule
- * @ignore
+ /**
+ * This fixes the previous function clip(). Perhaps the 'stroke path' hack was due to the missing 'n' instruction?
+ * We introduce the fixed version so as to not break API.
+ * @param fillRule
+ * @ignore
*/
@@ -3100,30 +2815,30 @@
} else if (style === 'FD' || style === 'DF') {
op = 'B'; // both
} else if (style === 'f' || style === 'f*' || style === 'B' || style === 'B*') {
- /*
- Allow direct use of these PDF path-painting operators:
- - f fill using nonzero winding number rule
- - f* fill using even-odd rule
- - B fill then stroke with fill using non-zero winding number rule
- - B* fill then stroke with fill using even-odd rule
+ /*
+ Allow direct use of these PDF path-painting operators:
+ - f fill using nonzero winding number rule
+ - f* fill using even-odd rule
+ - B fill then stroke with fill using non-zero winding number rule
+ - B* fill then stroke with fill using even-odd rule
*/
op = style;
}
return op;
};
- /**
- * Draw a line on the current page.
- *
- * @name line
- * @function
- * @instance
- * @param {number} x1
- * @param {number} y1
- * @param {number} x2
- * @param {number} y2
- * @returns {jsPDF}
- * @memberOf jsPDF
+ /**
+ * Draw a line on the current page.
+ *
+ * @name line
+ * @function
+ * @instance
+ * @param {number} x1
+ * @param {number} y1
+ * @param {number} x2
+ * @param {number} y2
+ * @returns {jsPDF}
+ * @memberOf jsPDF
*/
@@ -3134,25 +2849,25 @@
return this.lines([[x2 - x1, y2 - y1]], x1, y1);
};
- /**
- * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.
- * All data points in `lines` are relative to last line origin.
- * `x`, `y` become x1,y1 for first line / curve in the set.
- * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.
- * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.
- *
- * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line
- * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).
- * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
- * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
- * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.
- * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
- * @param {boolean} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name lines
+ /**
+ * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.
+ * All data points in `lines` are relative to last line origin.
+ * `x`, `y` become x1,y1 for first line / curve in the set.
+ * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.
+ * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.
+ *
+ * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line
+ * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).
+ * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
+ * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+ * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.
+ * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @param {boolean} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name lines
*/
@@ -3228,19 +2943,19 @@
return this;
};
- /**
- * Adds a rectangle to PDF.
- *
- * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
- * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
- * @param {number} w Width (in units declared at inception of PDF document).
- * @param {number} h Height (in units declared at inception of PDF document).
- * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name rect
+ /**
+ * Adds a rectangle to PDF.
+ *
+ * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
+ * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+ * @param {number} w Width (in units declared at inception of PDF document).
+ * @param {number} h Height (in units declared at inception of PDF document).
+ * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name rect
*/
@@ -3257,21 +2972,21 @@
return this;
};
- /**
- * Adds a triangle to PDF.
- *
- * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page.
- * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page.
- * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page.
- * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page.
- * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page.
- * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page.
- * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name triangle
+ /**
+ * Adds a triangle to PDF.
+ *
+ * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page.
+ * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+ * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page.
+ * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+ * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page.
+ * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+ * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name triangle
*/
@@ -3287,21 +3002,21 @@
[1, 1], style, true);
return this;
};
- /**
- * Adds a rectangle with rounded corners to PDF.
- *
- * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
- * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
- * @param {number} w Width (in units declared at inception of PDF document).
- * @param {number} h Height (in units declared at inception of PDF document).
- * @param {number} rx Radius along x axis (in units declared at inception of PDF document).
- * @param {number} ry Radius along y axis (in units declared at inception of PDF document).
- * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name roundedRect
+ /**
+ * Adds a rectangle with rounded corners to PDF.
+ *
+ * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
+ * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+ * @param {number} w Width (in units declared at inception of PDF document).
+ * @param {number} h Height (in units declared at inception of PDF document).
+ * @param {number} rx Radius along x axis (in units declared at inception of PDF document).
+ * @param {number} ry Radius along y axis (in units declared at inception of PDF document).
+ * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name roundedRect
*/
@@ -3315,19 +3030,19 @@
[1, 1], style);
return this;
};
- /**
- * Adds an ellipse to PDF.
- *
- * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
- * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
- * @param {number} rx Radius along x axis (in units declared at inception of PDF document).
- * @param {number} ry Radius along y axis (in units declared at inception of PDF document).
- * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name ellipse
+ /**
+ * Adds an ellipse to PDF.
+ *
+ * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
+ * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+ * @param {number} rx Radius along x axis (in units declared at inception of PDF document).
+ * @param {number} ry Radius along y axis (in units declared at inception of PDF document).
+ * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name ellipse
*/
@@ -3349,18 +3064,18 @@
return this;
};
- /**
- * Adds an circle to PDF.
- *
- * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
- * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
- * @param {number} r Radius (in units declared at inception of PDF document).
- * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name circle
+ /**
+ * Adds an circle to PDF.
+ *
+ * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
+ * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+ * @param {number} r Radius (in units declared at inception of PDF document).
+ * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name circle
*/
@@ -3371,17 +3086,17 @@
return this.ellipse(x, y, r, r, style);
};
- /**
- * Sets text font face, variant for upcoming text elements.
- * See output of jsPDF.getFontList() for possible font names, styles.
- *
- * @param {string} fontName Font name or family. Example: "times".
- * @param {string} fontStyle Font style or variant. Example: "italic".
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setFont
+ /**
+ * Sets text font face, variant for upcoming text elements.
+ * See output of jsPDF.getFontList() for possible font names, styles.
+ *
+ * @param {string} fontName Font name or family. Example: "times".
+ * @param {string} fontStyle Font style or variant. Example: "italic".
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setFont
*/
@@ -3391,17 +3106,17 @@
});
return this;
};
- /**
- * Switches font style or variant for upcoming text elements,
- * while keeping the font face or family same.
- * See output of jsPDF.getFontList() for possible font names, styles.
- *
- * @param {string} style Font style or variant. Example: "italic".
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setFontStyle
+ /**
+ * Switches font style or variant for upcoming text elements,
+ * while keeping the font face or family same.
+ * See output of jsPDF.getFontList() for possible font names, styles.
+ *
+ * @param {string} style Font style or variant. Example: "italic".
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setFontStyle
*/
@@ -3410,16 +3125,16 @@
return this;
};
- /**
- * Returns an object - a tree of fontName to fontStyle relationships available to
- * active PDF document.
- *
- * @public
- * @function
- * @instance
- * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }
- * @memberOf jsPDF
- * @name getFontList
+ /**
+ * Returns an object - a tree of fontName to fontStyle relationships available to
+ * active PDF document.
+ *
+ * @public
+ * @function
+ * @instance
+ * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }
+ * @memberOf jsPDF
+ * @name getFontList
*/
@@ -3444,17 +3159,17 @@
return list;
};
- /**
- * Add a custom font to the current instance.
- *
- * @property {string} postScriptName PDF specification full name for the font.
- * @property {string} id PDF-document-instance-specific label assinged to the font.
- * @property {string} fontStyle Style of the Font.
- * @property {Object} encoding Encoding_name-to-Font_metrics_object mapping.
- * @function
- * @instance
- * @memberOf jsPDF
- * @name addFont
+ /**
+ * Add a custom font to the current instance.
+ *
+ * @property {string} postScriptName PDF specification full name for the font.
+ * @property {string} id PDF-document-instance-specific label assinged to the font.
+ * @property {string} fontStyle Style of the Font.
+ * @property {Object} encoding Encoding_name-to-Font_metrics_object mapping.
+ * @function
+ * @instance
+ * @memberOf jsPDF
+ * @name addFont
*/
@@ -3465,32 +3180,32 @@
var lineWidth = options.lineWidth || 0.200025; // 2mm
- /**
- * Sets line width for upcoming lines.
- *
- * @param {number} width Line width (in units declared at inception of PDF document).
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setLineWidth
+ /**
+ * Sets line width for upcoming lines.
+ *
+ * @param {number} width Line width (in units declared at inception of PDF document).
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setLineWidth
*/
var setLineWidth = API.__private__.setLineWidth = API.setLineWidth = function (width) {
out((width * k).toFixed(2) + ' w');
return this;
};
- /**
- * Sets the dash pattern for upcoming lines.
- *
- * To reset the settings simply call the method without any parameters.
- * @param {array} dashArray The pattern of the line, expects numbers.
- * @param {number} dashPhase The phase at which the dash pattern starts.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setLineDash
+ /**
+ * Sets the dash pattern for upcoming lines.
+ *
+ * To reset the settings simply call the method without any parameters.
+ * @param {array} dashArray The pattern of the line, expects numbers.
+ * @param {number} dashPhase The phase at which the dash pattern starts.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setLineDash
*/
@@ -3521,15 +3236,15 @@
var getLineHeight = API.__private__.getLineHeight = API.getLineHeight = function () {
return activeFontSize * lineHeightFactor;
};
- /**
- * Sets the LineHeightFactor of proportion.
- *
- * @param {number} value LineHeightFactor value. Default: 1.15.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setLineHeightFactor
+ /**
+ * Sets the LineHeightFactor of proportion.
+ *
+ * @param {number} value LineHeightFactor value. Default: 1.15.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setLineHeightFactor
*/
@@ -3542,14 +3257,14 @@
return this;
};
- /**
- * Gets the LineHeightFactor, default: 1.15.
- *
- * @function
- * @instance
- * @returns {number} lineHeightFactor
- * @memberOf jsPDF
- * @name getLineHeightFactor
+ /**
+ * Gets the LineHeightFactor, default: 1.15.
+ *
+ * @function
+ * @instance
+ * @returns {number} lineHeightFactor
+ * @memberOf jsPDF
+ * @name getLineHeightFactor
*/
@@ -3576,56 +3291,56 @@
};
var strokeColor = options.strokeColor || '0 G';
- /**
- * Gets the stroke color for upcoming elements.
- *
- * @function
- * @instance
- * @returns {string} colorAsHex
- * @memberOf jsPDF
- * @name getDrawColor
+ /**
+ * Gets the stroke color for upcoming elements.
+ *
+ * @function
+ * @instance
+ * @returns {string} colorAsHex
+ * @memberOf jsPDF
+ * @name getDrawColor
*/
var getStrokeColor = API.__private__.getStrokeColor = API.getDrawColor = function () {
return decodeColorString(strokeColor);
};
- /**
- * Sets the stroke color for upcoming elements.
- *
- * Depending on the number of arguments given, Gray, RGB, or CMYK
- * color space is implied.
- *
- * When only ch1 is given, "Gray" color space is implied and it
- * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
- * if values are communicated as String types, or in range from 0 (black)
- * to 255 (white) if communicated as Number type.
- * The RGB-like 0-255 range is provided for backward compatibility.
- *
- * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
- * value must be in the range from 0.00 (minimum intensity) to to 1.00
- * (max intensity) if values are communicated as String types, or
- * from 0 (min intensity) to to 255 (max intensity) if values are communicated
- * as Number types.
- * The RGB-like 0-255 range is provided for backward compatibility.
- *
- * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
- * value must be a in the range from 0.00 (0% concentration) to to
- * 1.00 (100% concentration)
- *
- * Because JavaScript treats fixed point numbers badly (rounds to
- * floating point nearest to binary representation) it is highly advised to
- * communicate the fractional numbers as String types, not JavaScript Number type.
- *
- * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
- * @param {Number|String} ch2 Color channel value.
- * @param {Number|String} ch3 Color channel value.
- * @param {Number|String} ch4 Color channel value.
- *
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setDrawColor
+ /**
+ * Sets the stroke color for upcoming elements.
+ *
+ * Depending on the number of arguments given, Gray, RGB, or CMYK
+ * color space is implied.
+ *
+ * When only ch1 is given, "Gray" color space is implied and it
+ * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+ * if values are communicated as String types, or in range from 0 (black)
+ * to 255 (white) if communicated as Number type.
+ * The RGB-like 0-255 range is provided for backward compatibility.
+ *
+ * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+ * value must be in the range from 0.00 (minimum intensity) to to 1.00
+ * (max intensity) if values are communicated as String types, or
+ * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+ * as Number types.
+ * The RGB-like 0-255 range is provided for backward compatibility.
+ *
+ * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+ * value must be a in the range from 0.00 (0% concentration) to to
+ * 1.00 (100% concentration)
+ *
+ * Because JavaScript treats fixed point numbers badly (rounds to
+ * floating point nearest to binary representation) it is highly advised to
+ * communicate the fractional numbers as String types, not JavaScript Number type.
+ *
+ * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+ * @param {Number|String} ch2 Color channel value.
+ * @param {Number|String} ch3 Color channel value.
+ * @param {Number|String} ch4 Color channel value.
+ *
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setDrawColor
*/
@@ -3644,56 +3359,56 @@
};
var fillColor = options.fillColor || '0 g';
- /**
- * Gets the fill color for upcoming elements.
- *
- * @function
- * @instance
- * @returns {string} colorAsHex
- * @memberOf jsPDF
- * @name getFillColor
+ /**
+ * Gets the fill color for upcoming elements.
+ *
+ * @function
+ * @instance
+ * @returns {string} colorAsHex
+ * @memberOf jsPDF
+ * @name getFillColor
*/
var getFillColor = API.__private__.getFillColor = API.getFillColor = function () {
return decodeColorString(fillColor);
};
- /**
- * Sets the fill color for upcoming elements.
- *
- * Depending on the number of arguments given, Gray, RGB, or CMYK
- * color space is implied.
- *
- * When only ch1 is given, "Gray" color space is implied and it
- * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
- * if values are communicated as String types, or in range from 0 (black)
- * to 255 (white) if communicated as Number type.
- * The RGB-like 0-255 range is provided for backward compatibility.
- *
- * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
- * value must be in the range from 0.00 (minimum intensity) to to 1.00
- * (max intensity) if values are communicated as String types, or
- * from 0 (min intensity) to to 255 (max intensity) if values are communicated
- * as Number types.
- * The RGB-like 0-255 range is provided for backward compatibility.
- *
- * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
- * value must be a in the range from 0.00 (0% concentration) to to
- * 1.00 (100% concentration)
- *
- * Because JavaScript treats fixed point numbers badly (rounds to
- * floating point nearest to binary representation) it is highly advised to
- * communicate the fractional numbers as String types, not JavaScript Number type.
- *
- * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
- * @param {Number|String} ch2 Color channel value.
- * @param {Number|String} ch3 Color channel value.
- * @param {Number|String} ch4 Color channel value.
- *
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setFillColor
+ /**
+ * Sets the fill color for upcoming elements.
+ *
+ * Depending on the number of arguments given, Gray, RGB, or CMYK
+ * color space is implied.
+ *
+ * When only ch1 is given, "Gray" color space is implied and it
+ * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+ * if values are communicated as String types, or in range from 0 (black)
+ * to 255 (white) if communicated as Number type.
+ * The RGB-like 0-255 range is provided for backward compatibility.
+ *
+ * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+ * value must be in the range from 0.00 (minimum intensity) to to 1.00
+ * (max intensity) if values are communicated as String types, or
+ * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+ * as Number types.
+ * The RGB-like 0-255 range is provided for backward compatibility.
+ *
+ * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+ * value must be a in the range from 0.00 (0% concentration) to to
+ * 1.00 (100% concentration)
+ *
+ * Because JavaScript treats fixed point numbers badly (rounds to
+ * floating point nearest to binary representation) it is highly advised to
+ * communicate the fractional numbers as String types, not JavaScript Number type.
+ *
+ * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+ * @param {Number|String} ch2 Color channel value.
+ * @param {Number|String} ch3 Color channel value.
+ * @param {Number|String} ch4 Color channel value.
+ *
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setFillColor
*/
@@ -3712,56 +3427,56 @@
};
var textColor = options.textColor || '0 g';
- /**
- * Gets the text color for upcoming elements.
- *
- * @function
- * @instance
- * @returns {string} colorAsHex
- * @memberOf jsPDF
- * @name getTextColor
+ /**
+ * Gets the text color for upcoming elements.
+ *
+ * @function
+ * @instance
+ * @returns {string} colorAsHex
+ * @memberOf jsPDF
+ * @name getTextColor
*/
var getTextColor = API.__private__.getTextColor = API.getTextColor = function () {
return decodeColorString(textColor);
};
- /**
- * Sets the text color for upcoming elements.
- *
- * Depending on the number of arguments given, Gray, RGB, or CMYK
- * color space is implied.
- *
- * When only ch1 is given, "Gray" color space is implied and it
- * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
- * if values are communicated as String types, or in range from 0 (black)
- * to 255 (white) if communicated as Number type.
- * The RGB-like 0-255 range is provided for backward compatibility.
- *
- * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
- * value must be in the range from 0.00 (minimum intensity) to to 1.00
- * (max intensity) if values are communicated as String types, or
- * from 0 (min intensity) to to 255 (max intensity) if values are communicated
- * as Number types.
- * The RGB-like 0-255 range is provided for backward compatibility.
- *
- * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
- * value must be a in the range from 0.00 (0% concentration) to to
- * 1.00 (100% concentration)
- *
- * Because JavaScript treats fixed point numbers badly (rounds to
- * floating point nearest to binary representation) it is highly advised to
- * communicate the fractional numbers as String types, not JavaScript Number type.
- *
- * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
- * @param {Number|String} ch2 Color channel value.
- * @param {Number|String} ch3 Color channel value.
- * @param {Number|String} ch4 Color channel value.
- *
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setTextColor
+ /**
+ * Sets the text color for upcoming elements.
+ *
+ * Depending on the number of arguments given, Gray, RGB, or CMYK
+ * color space is implied.
+ *
+ * When only ch1 is given, "Gray" color space is implied and it
+ * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+ * if values are communicated as String types, or in range from 0 (black)
+ * to 255 (white) if communicated as Number type.
+ * The RGB-like 0-255 range is provided for backward compatibility.
+ *
+ * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+ * value must be in the range from 0.00 (minimum intensity) to to 1.00
+ * (max intensity) if values are communicated as String types, or
+ * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+ * as Number types.
+ * The RGB-like 0-255 range is provided for backward compatibility.
+ *
+ * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+ * value must be a in the range from 0.00 (0% concentration) to to
+ * 1.00 (100% concentration)
+ *
+ * Because JavaScript treats fixed point numbers badly (rounds to
+ * floating point nearest to binary representation) it is highly advised to
+ * communicate the fractional numbers as String types, not JavaScript Number type.
+ *
+ * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+ * @param {Number|String} ch2 Color channel value.
+ * @param {Number|String} ch3 Color channel value.
+ * @param {Number|String} ch4 Color channel value.
+ *
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setTextColor
*/
@@ -3779,28 +3494,28 @@
};
var activeCharSpace = options.charSpace || 0;
- /**
- * Get global value of CharSpace.
- *
- * @function
- * @instance
- * @returns {number} charSpace
- * @memberOf jsPDF
- * @name getCharSpace
+ /**
+ * Get global value of CharSpace.
+ *
+ * @function
+ * @instance
+ * @returns {number} charSpace
+ * @memberOf jsPDF
+ * @name getCharSpace
*/
var getCharSpace = API.__private__.getCharSpace = API.getCharSpace = function () {
return activeCharSpace;
};
- /**
- * Set global value of CharSpace.
- *
- * @param {number} charSpace
- * @function
- * @instance
- * @returns {jsPDF} jsPDF-instance
- * @memberOf jsPDF
- * @name setCharSpace
+ /**
+ * Set global value of CharSpace.
+ *
+ * @param {number} charSpace
+ * @function
+ * @instance
+ * @returns {jsPDF} jsPDF-instance
+ * @memberOf jsPDF
+ * @name setCharSpace
*/
@@ -3814,13 +3529,13 @@
};
var lineCapID = 0;
- /**
- * Is an Object providing a mapping from human-readable to
- * integer flag values designating the varieties of line cap
- * and join styles.
- *
- * @memberOf jsPDF
- * @name CapJoinStyles
+ /**
+ * Is an Object providing a mapping from human-readable to
+ * integer flag values designating the varieties of line cap
+ * and join styles.
+ *
+ * @memberOf jsPDF
+ * @name CapJoinStyles
*/
API.CapJoinStyles = {
@@ -3838,16 +3553,16 @@
'square': 2,
'bevel': 2
};
- /**
- * Sets the line cap styles.
- * See {jsPDF.CapJoinStyles} for variants.
- *
- * @param {String|Number} style A string or number identifying the type of line cap.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setLineCap
+ /**
+ * Sets the line cap styles.
+ * See {jsPDF.CapJoinStyles} for variants.
+ *
+ * @param {String|Number} style A string or number identifying the type of line cap.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setLineCap
*/
var setLineCap = API.__private__.setLineCap = API.setLineCap = function (style) {
@@ -3863,16 +3578,16 @@
};
var lineJoinID = 0;
- /**
- * Sets the line join styles.
- * See {jsPDF.CapJoinStyles} for variants.
- *
- * @param {String|Number} style A string or number identifying the type of line join.
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setLineJoin
+ /**
+ * Sets the line join styles.
+ * See {jsPDF.CapJoinStyles} for variants.
+ *
+ * @param {String|Number} style A string or number identifying the type of line join.
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setLineJoin
*/
var setLineJoin = API.__private__.setLineJoin = API.setLineJoin = function (style) {
@@ -3888,15 +3603,15 @@
};
var miterLimit;
- /**
- * Sets the miterLimit property, which effects the maximum miter length.
- *
- * @param {number} length The length of the miter
- * @function
- * @instance
- * @returns {jsPDF}
- * @memberOf jsPDF
- * @name setMiterLimit
+ /**
+ * Sets the miterLimit property, which effects the maximum miter length.
+ *
+ * @param {number} length The length of the miter
+ * @function
+ * @instance
+ * @returns {jsPDF}
+ * @memberOf jsPDF
+ * @name setMiterLimit
*/
var setMiterLimit = API.__private__.setMiterLimit = API.setMiterLimit = function (length) {
@@ -3910,17 +3625,17 @@
out(miterLimit + ' M');
return this;
};
- /**
- * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').
- * Uses FileSaver.js-method saveAs.
- *
- * @memberOf jsPDF
- * @name save
- * @function
- * @instance
- * @param {string} filename The filename including extension.
- * @param {Object} options An Object with additional options, possible options: 'returnPromise'.
- * @returns {jsPDF} jsPDF-instance
+ /**
+ * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').
+ * Uses FileSaver.js-method saveAs.
+ *
+ * @memberOf jsPDF
+ * @name save
+ * @function
+ * @instance
+ * @param {string} filename The filename including extension.
+ * @param {Object} options An Object with additional options, possible options: 'returnPromise'.
+ * @returns {jsPDF} jsPDF-instance
*/
@@ -3986,10 +3701,10 @@
}
}
}
- /**
- * Object exposing internal API to plugins
- * @public
- * @ignore
+ /**
+ * Object exposing internal API to plugins
+ * @public
+ * @ignore
*/
@@ -4083,42 +3798,42 @@
events.publish('initialized');
return API;
}
- /**
- * jsPDF.API is a STATIC property of jsPDF class.
- * jsPDF.API is an object you can add methods and properties to.
- * The methods / properties you add will show up in new jsPDF objects.
- *
- * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,
- * callbacks to this object. These will be reassigned to all new instances of jsPDF.
- *
- * @static
- * @public
- * @memberOf jsPDF
- * @name API
- *
- * @example
- * jsPDF.API.mymethod = function(){
- * // 'this' will be ref to internal API object. see jsPDF source
- * // , so you can refer to built-in methods like so:
- * // this.line(....)
- * // this.text(....)
- * }
- * var pdfdoc = new jsPDF()
- * pdfdoc.mymethod() // <- !!!!!!
+ /**
+ * jsPDF.API is a STATIC property of jsPDF class.
+ * jsPDF.API is an object you can add methods and properties to.
+ * The methods / properties you add will show up in new jsPDF objects.
+ *
+ * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,
+ * callbacks to this object. These will be reassigned to all new instances of jsPDF.
+ *
+ * @static
+ * @public
+ * @memberOf jsPDF
+ * @name API
+ *
+ * @example
+ * jsPDF.API.mymethod = function(){
+ * // 'this' will be ref to internal API object. see jsPDF source
+ * // , so you can refer to built-in methods like so:
+ * // this.line(....)
+ * // this.text(....)
+ * }
+ * var pdfdoc = new jsPDF()
+ * pdfdoc.mymethod() // <- !!!!!!
*/
jsPDF.API = {
events: []
};
- /**
- * The version of jsPDF.
- * @name version
- * @type {string}
- * @memberOf jsPDF
+ /**
+ * The version of jsPDF.
+ * @name version
+ * @type {string}
+ * @memberOf jsPDF
*/
- jsPDF.version = '1.5.2';
+ jsPDF.version = '1.5.3';
if (typeof define === 'function' && define.amd) {
define('jsPDF', function () {
@@ -4136,23 +3851,17 @@
// while `this` is nsIContentFrameMessageManager
// with an attribute `content` that corresponds to the window
- /*rollup-keeper-start*/
-
-
- window.tmp = jsPDF;
- /*rollup-keeper-end*/
-
- /**
- * @license
- * Copyright (c) 2016 Alexander Weidt,
- * https://github.com/BiggA94
- *
- * Licensed under the MIT License. http://opensource.org/licenses/mit-license
+ /**
+ * @license
+ * Copyright (c) 2016 Alexander Weidt,
+ * https://github.com/BiggA94
+ *
+ * Licensed under the MIT License. http://opensource.org/licenses/mit-license
*/
- /**
- * jsPDF AcroForm Plugin
- * @module AcroForm
+ /**
+ * jsPDF AcroForm Plugin
+ * @module AcroForm
*/
(function (jsPDFAPI, globalObj) {
@@ -4206,8 +3915,8 @@
xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];
return xobj;
};
- /**
- * Bit-Operations
+ /**
+ * Bit-Operations
*/
@@ -4244,8 +3953,8 @@
return (number & 1 << bitPosition) === 0 ? 0 : 1;
};
- /*
- * Ff starts counting the bit position at 1 and not like javascript at 0
+ /*
+ * Ff starts counting the bit position at 1 and not like javascript at 0
*/
@@ -4464,12 +4173,12 @@
returnValue.fontSize = fontSize;
return returnValue;
};
- /**
- * Small workaround for calculating the TextMetric approximately.
- *
- * @param text
- * @param fontsize
- * @returns {TextMetrics} (Has Height and Width)
+ /**
+ * Small workaround for calculating the TextMetric approximately.
+ *
+ * @param text
+ * @param fontsize
+ * @returns {TextMetrics} (Has Height and Width)
*/
@@ -4495,17 +4204,17 @@
fields: [],
xForms: [],
- /**
- * acroFormDictionaryRoot contains information about the AcroForm
- * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has
- * 1: The Object ID of the Root
+ /**
+ * acroFormDictionaryRoot contains information about the AcroForm
+ * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has
+ * 1: The Object ID of the Root
*/
acroFormDictionaryRoot: null,
- /**
- * After the PDF gets evaluated, the reference to the root has to be
- * reset, this indicates, whether the root has already been printed
- * out
+ /**
+ * After the PDF gets evaluated, the reference to the root has to be
+ * reset, this indicates, whether the root has already been printed
+ * out
*/
printedOut: false,
internal: null,
@@ -4544,9 +4253,9 @@
scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(formObject);
};
- /**
- * Create the Reference to the widgetAnnotation, so that it gets referenced
- * in the Annot[] int the+ (Requires the Annotation Plugin)
+ /**
+ * Create the Reference to the widgetAnnotation, so that it gets referenced
+ * in the Annot[] int the+ (Requires the Annotation Plugin)
*/
@@ -4575,9 +4284,9 @@
throw new Error('putCatalogCallback: Root missing.');
}
};
- /**
- * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm
- * Dictionary
+ /**
+ * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm
+ * Dictionary
*/
@@ -4587,11 +4296,11 @@
delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;
scope.internal.acroformPlugin.printedOut = true;
};
- /**
- * Creates the single Fields and writes them into the Document
- *
- * If fieldArray is set, use the fields that are inside it instead of the
- * fields from the AcroRoot (for the FormXObjects...)
+ /**
+ * Creates the single Fields and writes them into the Document
+ *
+ * If fieldArray is set, use the fields that are inside it instead of the
+ * fields from the AcroRoot (for the FormXObjects...)
*/
@@ -4813,17 +4522,17 @@
// Classes
// ##########################
- /**
- * @class AcroFormPDFObject
- * @classdesc A AcroFormPDFObject
+ /**
+ * @class AcroFormPDFObject
+ * @classdesc A AcroFormPDFObject
*/
var AcroFormPDFObject = function AcroFormPDFObject() {
var _objId;
- /** *
- * @name AcroFormPDFObject#objId
- * @type {any}
+ /** *
+ * @name AcroFormPDFObject#objId
+ * @type {any}
*/
@@ -4845,8 +4554,8 @@
}
});
};
- /**
- * @function AcroFormPDFObject.toString
+ /**
+ * @function AcroFormPDFObject.toString
*/
@@ -4862,11 +4571,11 @@
});
scope.internal.out("endobj");
};
- /**
- * Returns an key-value-List of all non-configurable Variables from the Object
- *
- * @name getKeyValueListForStream
- * @returns {string}
+ /**
+ * Returns an key-value-List of all non-configurable Variables from the Object
+ *
+ * @name getKeyValueListForStream
+ * @returns {string}
*/
@@ -5006,11 +4715,11 @@
};
inherit(AcroFormDictionary, AcroFormPDFObject);
- /**
- * The Field Object contains the Variables, that every Field needs
- *
- * @class AcroFormField
- * @classdesc An AcroForm FieldObject
+ /**
+ * The Field Object contains the Variables, that every Field needs
+ *
+ * @class AcroFormField
+ * @classdesc An AcroForm FieldObject
*/
var AcroFormField = function AcroFormField() {
@@ -5031,13 +4740,13 @@
}
}
});
- /**
- * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.
- * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.
- *
- * @name AcroFormField#showWhenPrinted
- * @default true
- * @type {boolean}
+ /**
+ * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.
+ * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.
+ *
+ * @name AcroFormField#showWhenPrinted
+ * @default true
+ * @type {boolean}
*/
Object.defineProperty(this, 'showWhenPrinted', {
@@ -5088,12 +4797,12 @@
}
}
});
- /**
- * The x-position of the field.
- *
- * @name AcroFormField#x
- * @default null
- * @type {number}
+ /**
+ * The x-position of the field.
+ *
+ * @name AcroFormField#x
+ * @default null
+ * @type {number}
*/
Object.defineProperty(this, 'x', {
@@ -5110,12 +4819,12 @@
_Rect[0] = scale(value);
}
});
- /**
- * The y-position of the field.
- *
- * @name AcroFormField#y
- * @default null
- * @type {number}
+ /**
+ * The y-position of the field.
+ *
+ * @name AcroFormField#y
+ * @default null
+ * @type {number}
*/
Object.defineProperty(this, 'y', {
@@ -5132,12 +4841,12 @@
_Rect[1] = scale(value);
}
});
- /**
- * The width of the field.
- *
- * @name AcroFormField#width
- * @default null
- * @type {number}
+ /**
+ * The width of the field.
+ *
+ * @name AcroFormField#width
+ * @default null
+ * @type {number}
*/
Object.defineProperty(this, 'width', {
@@ -5154,12 +4863,12 @@
_Rect[2] = scale(value);
}
});
- /**
- * The height of the field.
- *
- * @name AcroFormField#height
- * @default null
- * @type {number}
+ /**
+ * The height of the field.
+ *
+ * @name AcroFormField#height
+ * @default null
+ * @type {number}
*/
Object.defineProperty(this, 'height', {
@@ -5217,12 +4926,12 @@
_T = value.toString();
}
});
- /**
- * (Optional) The partial field name (see 12.7.3.2, “Field Names”).
- *
- * @name AcroFormField#fieldName
- * @default null
- * @type {string}
+ /**
+ * (Optional) The partial field name (see 12.7.3.2, “Field Names”).
+ *
+ * @name AcroFormField#fieldName
+ * @default null
+ * @type {string}
*/
Object.defineProperty(this, 'fieldName', {
@@ -5236,12 +4945,12 @@
}
});
var _fontName = 'helvetica';
- /**
- * The fontName of the font to be used.
- *
- * @name AcroFormField#fontName
- * @default 'helvetica'
- * @type {string}
+ /**
+ * The fontName of the font to be used.
+ *
+ * @name AcroFormField#fontName
+ * @default 'helvetica'
+ * @type {string}
*/
Object.defineProperty(this, 'fontName', {
@@ -5255,12 +4964,12 @@
}
});
var _fontStyle = 'normal';
- /**
- * The fontStyle of the font to be used.
- *
- * @name AcroFormField#fontStyle
- * @default 'normal'
- * @type {string}
+ /**
+ * The fontStyle of the font to be used.
+ *
+ * @name AcroFormField#fontStyle
+ * @default 'normal'
+ * @type {string}
*/
Object.defineProperty(this, 'fontStyle', {
@@ -5274,12 +4983,12 @@
}
});
var _fontSize = 0;
- /**
- * The fontSize of the font to be used.
- *
- * @name AcroFormField#fontSize
- * @default 0 (for auto)
- * @type {number}
+ /**
+ * The fontSize of the font to be used.
+ *
+ * @name AcroFormField#fontSize
+ * @default 0 (for auto)
+ * @type {number}
*/
Object.defineProperty(this, 'fontSize', {
@@ -5293,12 +5002,12 @@
}
});
var _maxFontSize = 50;
- /**
- * The maximum fontSize of the font to be used.
- *
- * @name AcroFormField#maxFontSize
- * @default 0 (for auto)
- * @type {number}
+ /**
+ * The maximum fontSize of the font to be used.
+ *
+ * @name AcroFormField#maxFontSize
+ * @default 0 (for auto)
+ * @type {number}
*/
Object.defineProperty(this, 'maxFontSize', {
@@ -5312,12 +5021,12 @@
}
});
var _color = 'black';
- /**
- * The color of the text
- *
- * @name AcroFormField#color
- * @default 'black'
- * @type {string|rgba}
+ /**
+ * The color of the text
+ *
+ * @name AcroFormField#color
+ * @default 'black'
+ * @type {string|rgba}
*/
Object.defineProperty(this, 'color', {
@@ -5376,12 +5085,12 @@
}
}
});
- /**
- * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.
- *
- * @name AcroFormField#defaultValue
- * @default null
- * @type {any}
+ /**
+ * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.
+ *
+ * @name AcroFormField#defaultValue
+ * @default null
+ * @type {any}
*/
Object.defineProperty(this, 'defaultValue', {
@@ -5433,12 +5142,12 @@
}
}
});
- /**
- * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.
- *
- * @name AcroFormField#value
- * @default null
- * @type {any}
+ /**
+ * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.
+ *
+ * @name AcroFormField#value
+ * @default null
+ * @type {any}
*/
Object.defineProperty(this, 'value', {
@@ -5461,12 +5170,12 @@
}
}
});
- /**
- * Check if field has annotations
- *
- * @name AcroFormField#hasAnnotation
- * @readonly
- * @type {boolean}
+ /**
+ * Check if field has annotations
+ *
+ * @name AcroFormField#hasAnnotation
+ * @readonly
+ * @type {boolean}
*/
Object.defineProperty(this, 'hasAnnotation', {
@@ -5491,12 +5200,12 @@
}
});
var _hasAppearanceStream = false;
- /**
- * true if field has an appearanceStream
- *
- * @name AcroFormField#hasAppearanceStream
- * @readonly
- * @type {boolean}
+ /**
+ * true if field has an appearanceStream
+ *
+ * @name AcroFormField#hasAppearanceStream
+ * @readonly
+ * @type {boolean}
*/
Object.defineProperty(this, 'hasAppearanceStream', {
@@ -5511,11 +5220,11 @@
_hasAppearanceStream = value;
}
});
- /**
- * The page on which the AcroFormField is placed
- *
- * @name AcroFormField#page
- * @type {number}
+ /**
+ * The page on which the AcroFormField is placed
+ *
+ * @name AcroFormField#page
+ * @type {number}
*/
var _page;
@@ -5535,12 +5244,12 @@
_page = value;
}
});
- /**
- * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.
- *
- * @name AcroFormField#readOnly
- * @default false
- * @type {boolean}
+ /**
+ * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.
+ *
+ * @name AcroFormField#readOnly
+ * @default false
+ * @type {boolean}
*/
Object.defineProperty(this, 'readOnly', {
@@ -5557,12 +5266,12 @@
}
}
});
- /**
- * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).
- *
- * @name AcroFormField#required
- * @default false
- * @type {boolean}
+ /**
+ * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).
+ *
+ * @name AcroFormField#required
+ * @default false
+ * @type {boolean}
*/
Object.defineProperty(this, 'required', {
@@ -5579,12 +5288,12 @@
}
}
});
- /**
- * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)
- *
- * @name AcroFormField#noExport
- * @default false
- * @type {boolean}
+ /**
+ * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)
+ *
+ * @name AcroFormField#noExport
+ * @default false
+ * @type {boolean}
*/
Object.defineProperty(this, 'noExport', {
@@ -5620,13 +5329,13 @@
}
}
});
- /**
- * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:
- * 'left', 'center', 'right'
- *
- * @name AcroFormField#textAlign
- * @default 'left'
- * @type {string}
+ /**
+ * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:
+ * 'left', 'center', 'right'
+ *
+ * @name AcroFormField#textAlign
+ * @default 'left'
+ * @type {string}
*/
Object.defineProperty(this, 'textAlign', {
@@ -5674,9 +5383,9 @@
};
inherit(AcroFormField, AcroFormPDFObject);
- /**
- * @class AcroFormChoiceField
- * @extends AcroFormField
+ /**
+ * @class AcroFormChoiceField
+ * @extends AcroFormField
*/
var AcroFormChoiceField = function AcroFormChoiceField() {
@@ -5698,12 +5407,12 @@
_TI = value;
}
});
- /**
- * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.
- *
- * @name AcroFormChoiceField#topIndex
- * @default 0
- * @type {number}
+ /**
+ * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.
+ *
+ * @name AcroFormChoiceField#topIndex
+ * @default 0
+ * @type {number}
*/
Object.defineProperty(this, 'topIndex', {
@@ -5727,23 +5436,23 @@
_Opt = pdfArrayToStringArray(value);
}
});
- /**
- * @memberof AcroFormChoiceField
- * @name getOptions
- * @function
- * @instance
- * @returns {array} array of Options
+ /**
+ * @memberof AcroFormChoiceField
+ * @name getOptions
+ * @function
+ * @instance
+ * @returns {array} array of Options
*/
this.getOptions = function () {
return _Opt;
};
- /**
- * @memberof AcroFormChoiceField
- * @name setOptions
- * @function
- * @instance
- * @param {array} value
+ /**
+ * @memberof AcroFormChoiceField
+ * @name setOptions
+ * @function
+ * @instance
+ * @param {array} value
*/
@@ -5754,12 +5463,12 @@
_Opt.sort();
}
};
- /**
- * @memberof AcroFormChoiceField
- * @name addOption
- * @function
- * @instance
- * @param {string} value
+ /**
+ * @memberof AcroFormChoiceField
+ * @name addOption
+ * @function
+ * @instance
+ * @param {string} value
*/
@@ -5773,13 +5482,13 @@
_Opt.sort();
}
};
- /**
- * @memberof AcroFormChoiceField
- * @name removeOption
- * @function
- * @instance
- * @param {string} value
- * @param {boolean} allEntries (default: false)
+ /**
+ * @memberof AcroFormChoiceField
+ * @name removeOption
+ * @function
+ * @instance
+ * @param {string} value
+ * @param {boolean} allEntries (default: false)
*/
@@ -5796,12 +5505,12 @@
}
}
};
- /**
- * If set, the field is a combo box; if clear, the field is a list box.
- *
- * @name AcroFormChoiceField#combo
- * @default false
- * @type {boolean}
+ /**
+ * If set, the field is a combo box; if clear, the field is a list box.
+ *
+ * @name AcroFormChoiceField#combo
+ * @default false
+ * @type {boolean}
*/
@@ -5819,12 +5528,12 @@
}
}
});
- /**
- * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.
- *
- * @name AcroFormChoiceField#edit
- * @default false
- * @type {boolean}
+ /**
+ * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.
+ *
+ * @name AcroFormChoiceField#edit
+ * @default false
+ * @type {boolean}
*/
Object.defineProperty(this, 'edit', {
@@ -5844,12 +5553,12 @@
}
}
});
- /**
- * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).
- *
- * @name AcroFormChoiceField#sort
- * @default false
- * @type {boolean}
+ /**
+ * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).
+ *
+ * @name AcroFormChoiceField#sort
+ * @default false
+ * @type {boolean}
*/
Object.defineProperty(this, 'sort', {
@@ -5868,12 +5577,12 @@
}
}
});
- /**
- * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected
- *
- * @name AcroFormChoiceField#multiSelect
- * @default false
- * @type {boolean}
+ /**
+ * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected
+ *
+ * @name AcroFormChoiceField#multiSelect
+ * @default false
+ * @type {boolean}
*/
Object.defineProperty(this, 'multiSelect', {
@@ -5890,12 +5599,12 @@
}
}
});
- /**
- * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.
- *
- * @name AcroFormChoiceField#doNotSpellCheck
- * @default false
- * @type {boolean}
+ /**
+ * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.
+ *
+ * @name AcroFormChoiceField#doNotSpellCheck
+ * @default false
+ * @type {boolean}
*/
Object.defineProperty(this, 'doNotSpellCheck', {
@@ -5912,13 +5621,13 @@
}
}
});
- /**
- * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.
- * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.
- *
- * @name AcroFormChoiceField#commitOnSelChange
- * @default false
- * @type {boolean}
+ /**
+ * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.
+ * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.
+ *
+ * @name AcroFormChoiceField#commitOnSelChange
+ * @default false
+ * @type {boolean}
*/
Object.defineProperty(this, 'commitOnSelChange', {
@@ -5939,10 +5648,10 @@
};
inherit(AcroFormChoiceField, AcroFormField);
- /**
- * @class AcroFormListBox
- * @extends AcroFormChoiceField
- * @extends AcroFormField
+ /**
+ * @class AcroFormListBox
+ * @extends AcroFormChoiceField
+ * @extends AcroFormField
*/
var AcroFormListBox = function AcroFormListBox() {
@@ -5953,11 +5662,11 @@
};
inherit(AcroFormListBox, AcroFormChoiceField);
- /**
- * @class AcroFormComboBox
- * @extends AcroFormListBox
- * @extends AcroFormChoiceField
- * @extends AcroFormField
+ /**
+ * @class AcroFormComboBox
+ * @extends AcroFormListBox
+ * @extends AcroFormChoiceField
+ * @extends AcroFormField
*/
var AcroFormComboBox = function AcroFormComboBox() {
@@ -5966,12 +5675,12 @@
};
inherit(AcroFormComboBox, AcroFormListBox);
- /**
- * @class AcroFormEditBox
- * @extends AcroFormComboBox
- * @extends AcroFormListBox
- * @extends AcroFormChoiceField
- * @extends AcroFormField
+ /**
+ * @class AcroFormEditBox
+ * @extends AcroFormComboBox
+ * @extends AcroFormListBox
+ * @extends AcroFormChoiceField
+ * @extends AcroFormField
*/
var AcroFormEditBox = function AcroFormEditBox() {
@@ -5980,19 +5689,19 @@
};
inherit(AcroFormEditBox, AcroFormComboBox);
- /**
- * @class AcroFormButton
- * @extends AcroFormField
+ /**
+ * @class AcroFormButton
+ * @extends AcroFormField
*/
var AcroFormButton = function AcroFormButton() {
AcroFormField.call(this);
this.FT = "/Btn";
- /**
- * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.
- *
- * @name AcroFormButton#noToggleToOff
- * @type {boolean}
+ /**
+ * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.
+ *
+ * @name AcroFormButton#noToggleToOff
+ * @type {boolean}
*/
Object.defineProperty(this, 'noToggleToOff', {
@@ -6009,11 +5718,11 @@
}
}
});
- /**
- * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.
- *
- * @name AcroFormButton#radio
- * @type {boolean}
+ /**
+ * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.
+ *
+ * @name AcroFormButton#radio
+ * @type {boolean}
*/
Object.defineProperty(this, 'radio', {
@@ -6030,11 +5739,11 @@
}
}
});
- /**
- * If set, the field is a pushbutton that does not retain a permanent value.
- *
- * @name AcroFormButton#pushButton
- * @type {boolean}
+ /**
+ * If set, the field is a pushbutton that does not retain a permanent value.
+ *
+ * @name AcroFormButton#pushButton
+ * @type {boolean}
*/
Object.defineProperty(this, 'pushButton', {
@@ -6051,11 +5760,11 @@
}
}
});
- /**
- * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).
- *
- * @name AcroFormButton#radioIsUnison
- * @type {boolean}
+ /**
+ * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).
+ *
+ * @name AcroFormButton#radioIsUnison
+ * @type {boolean}
*/
Object.defineProperty(this, 'radioIsUnison', {
@@ -6098,16 +5807,16 @@
}
}
});
- /**
- * From the PDF reference:
- * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.
- * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields").
- *
- * - '8' = Cross,
- * - 'l' = Circle,
- * - '' = nothing
- * @name AcroFormButton#caption
- * @type {string}
+ /**
+ * From the PDF reference:
+ * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.
+ * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields").
+ *
+ * - '8' = Cross,
+ * - 'l' = Circle,
+ * - '' = nothing
+ * @name AcroFormButton#caption
+ * @type {string}
*/
Object.defineProperty(this, 'caption', {
@@ -6135,11 +5844,11 @@
_AS = value;
}
});
- /**
- * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams")
- *
- * @name AcroFormButton#appearanceState
- * @type {any}
+ /**
+ * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams")
+ *
+ * @name AcroFormButton#appearanceState
+ * @type {any}
*/
Object.defineProperty(this, 'appearanceState', {
@@ -6155,10 +5864,10 @@
};
inherit(AcroFormButton, AcroFormField);
- /**
- * @class AcroFormPushButton
- * @extends AcroFormButton
- * @extends AcroFormField
+ /**
+ * @class AcroFormPushButton
+ * @extends AcroFormButton
+ * @extends AcroFormField
*/
var AcroFormPushButton = function AcroFormPushButton() {
@@ -6167,10 +5876,10 @@
};
inherit(AcroFormPushButton, AcroFormButton);
- /**
- * @class AcroFormRadioButton
- * @extends AcroFormButton
- * @extends AcroFormField
+ /**
+ * @class AcroFormRadioButton
+ * @extends AcroFormButton
+ * @extends AcroFormField
*/
var AcroFormRadioButton = function AcroFormRadioButton() {
@@ -6195,12 +5904,12 @@
};
inherit(AcroFormRadioButton, AcroFormButton);
- /**
- * The Child class of a RadioButton (the radioGroup) -> The single Buttons
- *
- * @class AcroFormChildClass
- * @extends AcroFormField
- * @ignore
+ /**
+ * The Child class of a RadioButton (the radioGroup) -> The single Buttons
+ *
+ * @class AcroFormChildClass
+ * @extends AcroFormField
+ * @ignore
*/
var AcroFormChildClass = function AcroFormChildClass() {
@@ -6253,16 +5962,16 @@
}
}
});
- /**
- * From the PDF reference:
- * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.
- * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields").
- *
- * - '8' = Cross,
- * - 'l' = Circle,
- * - '' = nothing
- * @name AcroFormButton#caption
- * @type {string}
+ /**
+ * From the PDF reference:
+ * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.
+ * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields").
+ *
+ * - '8' = Cross,
+ * - 'l' = Circle,
+ * - '' = nothing
+ * @name AcroFormButton#caption
+ * @type {string}
*/
Object.defineProperty(this, 'caption', {
@@ -6290,11 +5999,11 @@
_AS = value;
}
});
- /**
- * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams")
- *
- * @name AcroFormButton#appearanceState
- * @type {any}
+ /**
+ * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams")
+ *
+ * @name AcroFormButton#appearanceState
+ * @type {any}
*/
Object.defineProperty(this, 'appearanceState', {
@@ -6345,10 +6054,10 @@
addField.call(this, child);
return child;
};
- /**
- * @class AcroFormCheckBox
- * @extends AcroFormButton
- * @extends AcroFormField
+ /**
+ * @class AcroFormCheckBox
+ * @extends AcroFormButton
+ * @extends AcroFormField
*/
@@ -6363,19 +6072,19 @@
};
inherit(AcroFormCheckBox, AcroFormButton);
- /**
- * @class AcroFormTextField
- * @extends AcroFormField
+ /**
+ * @class AcroFormTextField
+ * @extends AcroFormField
*/
var AcroFormTextField = function AcroFormTextField() {
AcroFormField.call(this);
this.FT = '/Tx';
- /**
- * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.
- *
- * @name AcroFormTextField#multiline
- * @type {boolean}
+ /**
+ * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.
+ *
+ * @name AcroFormTextField#multiline
+ * @type {boolean}
*/
Object.defineProperty(this, 'multiline', {
@@ -6392,11 +6101,11 @@
}
}
});
- /**
- * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.
- *
- * @name AcroFormTextField#fileSelect
- * @type {boolean}
+ /**
+ * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.
+ *
+ * @name AcroFormTextField#fileSelect
+ * @type {boolean}
*/
Object.defineProperty(this, 'fileSelect', {
@@ -6413,11 +6122,11 @@
}
}
});
- /**
- * (PDF 1.4) If set, text entered in the field shall not be spell-checked.
- *
- * @name AcroFormTextField#doNotSpellCheck
- * @type {boolean}
+ /**
+ * (PDF 1.4) If set, text entered in the field shall not be spell-checked.
+ *
+ * @name AcroFormTextField#doNotSpellCheck
+ * @type {boolean}
*/
Object.defineProperty(this, 'doNotSpellCheck', {
@@ -6434,11 +6143,11 @@
}
}
});
- /**
- * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.
- *
- * @name AcroFormTextField#doNotScroll
- * @type {boolean}
+ /**
+ * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.
+ *
+ * @name AcroFormTextField#doNotScroll
+ * @type {boolean}
*/
Object.defineProperty(this, 'doNotScroll', {
@@ -6455,11 +6164,11 @@
}
}
});
- /**
- * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.
- *
- * @name AcroFormTextField#comb
- * @type {boolean}
+ /**
+ * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.
+ *
+ * @name AcroFormTextField#comb
+ * @type {boolean}
*/
Object.defineProperty(this, 'comb', {
@@ -6476,11 +6185,11 @@
}
}
});
- /**
- * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.
- *
- * @name AcroFormTextField#richText
- * @type {boolean}
+ /**
+ * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.
+ *
+ * @name AcroFormTextField#richText
+ * @type {boolean}
*/
Object.defineProperty(this, 'richText', {
@@ -6508,11 +6217,11 @@
_MaxLen = value;
}
});
- /**
- * (Optional; inheritable) The maximum length of the field’s text, in characters.
- *
- * @name AcroFormTextField#maxLength
- * @type {number}
+ /**
+ * (Optional; inheritable) The maximum length of the field’s text, in characters.
+ *
+ * @name AcroFormTextField#maxLength
+ * @type {number}
*/
Object.defineProperty(this, 'maxLength', {
@@ -6537,20 +6246,20 @@
};
inherit(AcroFormTextField, AcroFormField);
- /**
- * @class AcroFormPasswordField
- * @extends AcroFormTextField
- * @extends AcroFormField
+ /**
+ * @class AcroFormPasswordField
+ * @extends AcroFormTextField
+ * @extends AcroFormField
*/
var AcroFormPasswordField = function AcroFormPasswordField() {
AcroFormTextField.call(this);
- /**
- * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.
- * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.
- *
- * @name AcroFormTextField#password
- * @type {boolean}
+ /**
+ * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.
+ * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.
+ *
+ * @name AcroFormTextField#password
+ * @type {boolean}
*/
Object.defineProperty(this, 'password', {
@@ -6587,10 +6296,10 @@
return appearance;
},
- /**
- * Returns the standard On Appearance for a CheckBox
- *
- * @returns {AcroFormXObject}
+ /**
+ * Returns the standard On Appearance for a CheckBox
+ *
+ * @returns {AcroFormXObject}
*/
YesPushDown: function YesPushDown(formObject) {
var xobj = createFormXObject(formObject);
@@ -6643,10 +6352,10 @@
return xobj;
},
- /**
- * Returns the standard Off Appearance for a CheckBox
- *
- * @returns {AcroFormXObject}
+ /**
+ * Returns the standard Off Appearance for a CheckBox
+ *
+ * @returns {AcroFormXObject}
*/
OffPushDown: function OffPushDown(formObject) {
var xobj = createFormXObject(formObject);
@@ -6683,8 +6392,8 @@
DotRadius = Number((DotRadius * 0.9).toFixed(5));
var c = AcroFormAppearance.internal.Bezier_C;
var DotRadiusBezier = Number((DotRadius * c).toFixed(5));
- /*
- * The Following is a Circle created with Bezier-Curves.
+ /*
+ * The Following is a Circle created with Bezier-Curves.
*/
stream.push("q");
@@ -6758,12 +6467,12 @@
}
},
Cross: {
- /**
- * Creates the Actual AppearanceDictionary-References
- *
- * @param {string} name
- * @returns {Object}
- * @ignore
+ /**
+ * Creates the Actual AppearanceDictionary-References
+ *
+ * @param {string} name
+ * @returns {Object}
+ * @ignore
*/
createAppearanceStream: function createAppearanceStream(name) {
var appearanceStreamContent = {
@@ -6828,10 +6537,10 @@
}
},
- /**
- * Returns the standard Appearance
- *
- * @returns {AcroFormXObject}
+ /**
+ * Returns the standard Appearance
+ *
+ * @returns {AcroFormXObject}
*/
createDefaultAppearanceStream: function createDefaultAppearanceStream(formObject) {
// Set Helvetica to Standard Font (size: auto)
@@ -6902,14 +6611,14 @@
return result;
}; // Public:
- /**
- * Add an AcroForm-Field to the jsPDF-instance
- *
- * @name addField
- * @function
- * @instance
- * @param {Object} fieldObject
- * @returns {jsPDF}
+ /**
+ * Add an AcroForm-Field to the jsPDF-instance
+ *
+ * @name addField
+ * @function
+ * @instance
+ * @param {Object} fieldObject
+ * @returns {jsPDF}
*/
@@ -6925,13 +6634,13 @@
fieldObject.page = scope.internal.getCurrentPageInfo().pageNumber;
return this;
};
- /**
- * @name addButton
- * @function
- * @instance
- * @param {AcroFormButton} options
- * @returns {jsPDF}
- * @deprecated
+ /**
+ * @name addButton
+ * @function
+ * @instance
+ * @param {AcroFormButton} options
+ * @returns {jsPDF}
+ * @deprecated
*/
@@ -6942,13 +6651,13 @@
return addField.call(this, button);
};
- /**
- * @name addTextField
- * @function
- * @instance
- * @param {AcroFormTextField} textField
- * @returns {jsPDF}
- * @deprecated
+ /**
+ * @name addTextField
+ * @function
+ * @instance
+ * @param {AcroFormTextField} textField
+ * @returns {jsPDF}
+ * @deprecated
*/
@@ -6959,13 +6668,13 @@
return addField.call(this, textField);
};
- /**
- * @name addChoiceField
- * @function
- * @instance
- * @param {AcroFormChoiceField}
- * @returns {jsPDF}
- * @deprecated
+ /**
+ * @name addChoiceField
+ * @function
+ * @instance
+ * @param {AcroFormChoiceField}
+ * @returns {jsPDF}
+ * @deprecated
*/
@@ -7022,22 +6731,22 @@
};
})(jsPDF.API, typeof window !== "undefined" && window || typeof global !== "undefined" && global);
- /** @license
- * jsPDF addImage plugin
- * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/
- * 2013 Chris Dowling, https://github.com/gingerchris
- * 2013 Trinh Ho, https://github.com/ineedfat
- * 2013 Edwin Alejandro Perez, https://github.com/eaparango
- * 2013 Norah Smith, https://github.com/burnburnrocket
- * 2014 Diego Casorran, https://github.com/diegocr
- * 2014 James Robb, https://github.com/jamesbrobb
- *
- *
+ /** @license
+ * jsPDF addImage plugin
+ * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/
+ * 2013 Chris Dowling, https://github.com/gingerchris
+ * 2013 Trinh Ho, https://github.com/ineedfat
+ * 2013 Edwin Alejandro Perez, https://github.com/eaparango
+ * 2013 Norah Smith, https://github.com/burnburnrocket
+ * 2014 Diego Casorran, https://github.com/diegocr
+ * 2014 James Robb, https://github.com/jamesbrobb
+ *
+ *
*/
- /**
- * @name addImage
- * @module
+ /**
+ * @name addImage
+ * @module
*/
(function (jsPDFAPI) {
@@ -7061,18 +6770,18 @@
[0x50, 0x54] //PT - OS/2 pointer
]
};
- /**
- * Recognize filetype of Image by magic-bytes
- *
- * https://en.wikipedia.org/wiki/List_of_file_signatures
- *
- * @name getImageFileTypeByImageData
- * @public
- * @function
- * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer
- * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'
- *
- * @returns {string} filetype of Image
+ /**
+ * Recognize filetype of Image by magic-bytes
+ *
+ * https://en.wikipedia.org/wiki/List_of_file_signatures
+ *
+ * @name getImageFileTypeByImageData
+ * @public
+ * @function
+ * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer
+ * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'
+ *
+ * @returns {string} filetype of Image
*/
var getImageFileTypeByImageData = jsPDFAPI.getImageFileTypeByImageData = function (imageData, fallbackFormat) {
@@ -7419,8 +7128,8 @@
this.internal.write('Q'); //Restore graphics state
};
- /**
- * COLOR SPACES
+ /**
+ * COLOR SPACES
*/
@@ -7437,8 +7146,8 @@
SEPARATION: 'Separation',
DEVICE_N: 'DeviceN'
};
- /**
- * DECODE METHODS
+ /**
+ * DECODE METHODS
*/
jsPDFAPI.decode = {
@@ -7452,8 +7161,8 @@
RUN_LENGTH_DECODE: 'RunLengthDecode',
CCITT_FAX_DECODE: 'CCITTFaxDecode'
};
- /**
- * IMAGE COMPRESSION TYPES
+ /**
+ * IMAGE COMPRESSION TYPES
*/
jsPDFAPI.image_compression = {
@@ -7462,11 +7171,11 @@
MEDIUM: 'MEDIUM',
SLOW: 'SLOW'
};
- /**
- * @name sHashCode
- * @function
- * @param {string} str
- * @returns {string}
+ /**
+ * @name sHashCode
+ * @function
+ * @param {string} str
+ * @returns {string}
*/
jsPDFAPI.sHashCode = function (str) {
@@ -7484,26 +7193,26 @@
return hash;
};
- /**
- * @name isString
- * @function
- * @param {any} object
- * @returns {boolean}
+ /**
+ * @name isString
+ * @function
+ * @param {any} object
+ * @returns {boolean}
*/
jsPDFAPI.isString = function (object) {
return typeof object === 'string';
};
- /**
- * Validates if given String is a valid Base64-String
- *
- * @name validateStringAsBase64
- * @public
- * @function
- * @param {String} possible Base64-String
- *
- * @returns {boolean}
+ /**
+ * Validates if given String is a valid Base64-String
+ *
+ * @name validateStringAsBase64
+ * @public
+ * @function
+ * @param {String} possible Base64-String
+ *
+ * @returns {boolean}
*/
@@ -7530,34 +7239,34 @@
return result;
};
- /**
- * Strips out and returns info from a valid base64 data URI
- *
- * @name extractInfoFromBase64DataURI
- * @function
- * @param {string} dataUrl a valid data URI of format 'data:[][;base64],'
- * @returns {Array}an Array containing the following
- * [0] the complete data URI
- * [1]
- * [2] format - the second part of the mime-type i.e 'png' in 'image/png'
- * [4]
+ /**
+ * Strips out and returns info from a valid base64 data URI
+ *
+ * @name extractInfoFromBase64DataURI
+ * @function
+ * @param {string} dataUrl a valid data URI of format 'data:[][;base64],'
+ * @returns {Array}an Array containing the following
+ * [0] the complete data URI
+ * [1]
+ * [2] format - the second part of the mime-type i.e 'png' in 'image/png'
+ * [4]
*/
jsPDFAPI.extractInfoFromBase64DataURI = function (dataURI) {
return /^data:([\w]+?\/([\w]+?));\S*;*base64,(.+)$/g.exec(dataURI);
};
- /**
- * Strips out and returns info from a valid base64 data URI
- *
- * @name extractImageFromDataUrl
- * @function
- * @param {string} dataUrl a valid data URI of format 'data:[][;base64],'
- * @returns {Array}an Array containing the following
- * [0] the complete data URI
- * [1]
- * [2] format - the second part of the mime-type i.e 'png' in 'image/png'
- * [4]
+ /**
+ * Strips out and returns info from a valid base64 data URI
+ *
+ * @name extractImageFromDataUrl
+ * @function
+ * @param {string} dataUrl a valid data URI of format 'data:[][;base64],'
+ * @returns {Array}an Array containing the following
+ * [0] the complete data URI
+ * [1]
+ * [2] format - the second part of the mime-type i.e 'png' in 'image/png'
+ * [4]
*/
@@ -7580,26 +7289,26 @@
return result;
};
- /**
- * Check to see if ArrayBuffer is supported
- *
- * @name supportsArrayBuffer
- * @function
- * @returns {boolean}
+ /**
+ * Check to see if ArrayBuffer is supported
+ *
+ * @name supportsArrayBuffer
+ * @function
+ * @returns {boolean}
*/
jsPDFAPI.supportsArrayBuffer = function () {
return typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined';
};
- /**
- * Tests supplied object to determine if ArrayBuffer
- *
- * @name isArrayBuffer
- * @function
- * @param {Object} object an Object
- *
- * @returns {boolean}
+ /**
+ * Tests supplied object to determine if ArrayBuffer
+ *
+ * @name isArrayBuffer
+ * @function
+ * @param {Object} object an Object
+ *
+ * @returns {boolean}
*/
@@ -7607,13 +7316,13 @@
if (!this.supportsArrayBuffer()) return false;
return object instanceof ArrayBuffer;
};
- /**
- * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface
- *
- * @name isArrayBufferView
- * @function
- * @param {Object} object an Object
- * @returns {boolean}
+ /**
+ * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface
+ *
+ * @name isArrayBufferView
+ * @function
+ * @param {Object} object an Object
+ * @returns {boolean}
*/
@@ -7622,21 +7331,21 @@
if (typeof Uint32Array === 'undefined') return false;
return object instanceof Int8Array || object instanceof Uint8Array || typeof Uint8ClampedArray !== 'undefined' && object instanceof Uint8ClampedArray || object instanceof Int16Array || object instanceof Uint16Array || object instanceof Int32Array || object instanceof Uint32Array || object instanceof Float32Array || object instanceof Float64Array;
};
- /**
- * Convert the Buffer to a Binary String
- *
- * @name binaryStringToUint8Array
- * @public
- * @function
- * @param {ArrayBuffer} BinaryString with ImageData
- *
- * @returns {Uint8Array}
+ /**
+ * Convert the Buffer to a Binary String
+ *
+ * @name binaryStringToUint8Array
+ * @public
+ * @function
+ * @param {ArrayBuffer} BinaryString with ImageData
+ *
+ * @returns {Uint8Array}
*/
jsPDFAPI.binaryStringToUint8Array = function (binary_string) {
- /*
- * not sure how efficient this will be will bigger files. Is there a native method?
+ /*
+ * not sure how efficient this will be will bigger files. Is there a native method?
*/
var len = binary_string.length;
var bytes = new Uint8Array(len);
@@ -7647,15 +7356,15 @@
return bytes;
};
- /**
- * Convert the Buffer to a Binary String
- *
- * @name arrayBufferToBinaryString
- * @public
- * @function
- * @param {ArrayBuffer} ArrayBuffer with ImageData
- *
- * @returns {String}
+ /**
+ * Convert the Buffer to a Binary String
+ *
+ * @name arrayBufferToBinaryString
+ * @public
+ * @function
+ * @param {ArrayBuffer} ArrayBuffer with ImageData
+ *
+ * @returns {String}
*/
@@ -7669,19 +7378,19 @@
return atob(this.arrayBufferToBase64(buffer));
}
};
- /**
- * Converts an ArrayBuffer directly to base64
- *
- * Taken from http://jsperf.com/encoding-xhr-image-data/31
- *
- * Need to test if this is a better solution for larger files
- *
- * @name arrayBufferToBase64
- * @param {arraybuffer} arrayBuffer
- * @public
- * @function
- *
- * @returns {string}
+ /**
+ * Converts an ArrayBuffer directly to base64
+ *
+ * Taken from http://jsperf.com/encoding-xhr-image-data/31
+ *
+ * Need to test if this is a better solution for larger files
+ *
+ * @name arrayBufferToBase64
+ * @param {arraybuffer} arrayBuffer
+ * @public
+ * @function
+ *
+ * @returns {string}
*/
@@ -7734,26 +7443,26 @@
return base64;
};
- /**
- *
- * @name createImageInfo
- * @param {Object} data
- * @param {number} wd width
- * @param {number} ht height
- * @param {Object} cs colorSpace
- * @param {number} bpc bits per channel
- * @param {any} f
- * @param {number} imageIndex
- * @param {string} alias
- * @param {any} dp
- * @param {any} trns
- * @param {any} pal
- * @param {any} smask
- * @param {any} p
- * @public
- * @function
- *
- * @returns {Object}
+ /**
+ *
+ * @name createImageInfo
+ * @param {Object} data
+ * @param {number} wd width
+ * @param {number} ht height
+ * @param {Object} cs colorSpace
+ * @param {number} bpc bits per channel
+ * @param {any} f
+ * @param {number} imageIndex
+ * @param {string} alias
+ * @param {any} dp
+ * @param {any} trns
+ * @param {any} pal
+ * @param {any} smask
+ * @param {any} p
+ * @public
+ * @function
+ *
+ * @returns {Object}
*/
@@ -7777,23 +7486,23 @@
return info;
};
- /**
- * Adds an Image to the PDF.
- *
- * @name addImage
- * @public
- * @function
- * @param {string/Image-Element/Canvas-Element/Uint8Array} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement
- * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'
- * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page
- * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page
- * @param {number} width width of the image (in units declared at inception of PDF document)
- * @param {number} height height of the Image (in units declared at inception of PDF document)
- * @param {string} alias alias of the image (if used multiple times)
- * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'
- * @param {number} rotation rotation of the image in degrees (0-359)
- *
- * @returns jsPDF
+ /**
+ * Adds an Image to the PDF.
+ *
+ * @name addImage
+ * @public
+ * @function
+ * @param {string/Image-Element/Canvas-Element/Uint8Array} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement
+ * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'
+ * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {number} width width of the image (in units declared at inception of PDF document)
+ * @param {number} height height of the Image (in units declared at inception of PDF document)
+ * @param {string} alias alias of the image (if used multiple times)
+ * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'
+ * @param {number} rotation rotation of the image in degrees (0-359)
+ *
+ * @returns jsPDF
*/
@@ -7864,9 +7573,9 @@
format = this.getImageFileTypeByImageData(imageData, format);
if (!isImageTypeSupported(format)) throw new Error('addImage does not support files of type \'' + format + '\', please ensure that a plugin for \'' + format + '\' support is added.');
- /**
- * need to test if it's more efficient to convert all binary strings
- * to TypedArray - or should we just leave and process as string?
+ /**
+ * need to test if it's more efficient to convert all binary strings
+ * to TypedArray - or should we just leave and process as string?
*/
if (this.supportsArrayBuffer()) {
@@ -7888,11 +7597,11 @@
writeImageToPDF.call(this, x, y, w, h, info, info.i, images, rotation);
return this;
};
- /**
- * @name convertStringToImageData
- * @function
- * @param {string} stringData
- * @returns {string} binary data
+ /**
+ * @name convertStringToImageData
+ * @function
+ * @param {string} stringData
+ * @returns {string} binary data
*/
@@ -7918,8 +7627,8 @@
return imageData;
};
- /**
- * JPEG SUPPORT
+ /**
+ * JPEG SUPPORT
**/
//takes a string imgData containing the raw bytes of
//a jpeg image and returns [width, height]
@@ -7999,8 +7708,8 @@
readBytes = function readBytes(data, offset) {
return data.subarray(offset, offset + 5);
};
- /**
- * @ignore
+ /**
+ * @ignore
*/
@@ -8047,8 +7756,8 @@
return this.createImageInfo(data, dims.width, dims.height, colorSpace, bpc, filter, index, alias);
};
- /**
- * @ignore
+ /**
+ * @ignore
*/
@@ -8057,11 +7766,11 @@
{
return this.processJPEG.apply(this, arguments);
};
- /**
- * @name getImageProperties
- * @function
- * @param {Object} imageData
- * @returns {Object}
+ /**
+ * @name getImageProperties
+ * @function
+ * @param {Object} imageData
+ * @returns {Object}
*/
@@ -8093,9 +7802,9 @@
if (!isImageTypeSupported(format)) {
throw new Error('addImage does not support files of type \'' + format + '\', please ensure that a plugin for \'' + format + '\' support is added.');
}
- /**
- * need to test if it's more efficient to convert all binary strings
- * to TypedArray - or should we just leave and process as string?
+ /**
+ * need to test if it's more efficient to convert all binary strings
+ * to TypedArray - or should we just leave and process as string?
*/
@@ -8123,59 +7832,59 @@
};
})(jsPDF.API);
- /**
- * @license
- * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
- *
- * Licensed under the MIT License.
- * http://opensource.org/licenses/mit-license
+ /**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
*/
- /**
- * jsPDF Annotations PlugIn
- *
- * There are many types of annotations in a PDF document. Annotations are placed
- * on a page at a particular location. They are not 'attached' to an object.
- *
- * This plugin current supports
- * Goto Page (set pageNumber and top in options)
- * Goto Name (set name and top in options)
- * Goto URL (set url in options)
- *
- * The destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below)
- * (set magFactor in options). XYZ is the default.
- *
- *
- * Links, Text, Popup, and FreeText are supported.
- *
- *
- * Options In PDF spec Not Implemented Yet
- *
link border
- * named target
- * page coordinates
- * destination page scaling and layout
- * actions other than URL and GotoPage
- * background / hover actions
- *
- * @name annotations
- * @module
+ /**
+ * jsPDF Annotations PlugIn
+ *
+ * There are many types of annotations in a PDF document. Annotations are placed
+ * on a page at a particular location. They are not 'attached' to an object.
+ *
+ * This plugin current supports
+ * Goto Page (set pageNumber and top in options)
+ * Goto Name (set name and top in options)
+ * Goto URL (set url in options)
+ *
+ * The destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below)
+ * (set magFactor in options). XYZ is the default.
+ *
+ *
+ * Links, Text, Popup, and FreeText are supported.
+ *
+ *
+ * Options In PDF spec Not Implemented Yet
+ *
link border
+ * named target
+ * page coordinates
+ * destination page scaling and layout
+ * actions other than URL and GotoPage
+ * background / hover actions
+ *
+ * @name annotations
+ * @module
*/
- /*
- Destination Magnification Factors
- See PDF 1.3 Page 386 for meanings and options
-
- [supported]
- XYZ (options; left top zoom)
- Fit (no options)
- FitH (options: top)
- FitV (options: left)
-
- [not supported]
- FitR
- FitB
- FitBH
- FitBV
+ /*
+ Destination Magnification Factors
+ See PDF 1.3 Page 386 for meanings and options
+
+ [supported]
+ XYZ (options; left top zoom)
+ Fit (no options)
+ FitH (options: top)
+ FitV (options: left)
+
+ [not supported]
+ FitR
+ FitB
+ FitBH
+ FitBV
*/
(function (jsPDFAPI) {
@@ -8329,10 +8038,10 @@
this.internal.write("]");
}]);
- /**
- * @name createAnnotation
- * @function
- * @param {Object} options
+ /**
+ * @name createAnnotation
+ * @function
+ * @param {Object} options
*/
jsPDFAPI.createAnnotation = function (options) {
@@ -8349,19 +8058,19 @@
break;
}
};
- /**
- * Create a link
- *
- * valid options
- * pageNumber or url [required]
- * If pageNumber is specified, top and zoom may also be specified
- * @name link
- * @function
- * @param {number} x
- * @param {number} y
- * @param {number} w
- * @param {number} h
- * @param {Object} options
+ /**
+ * Create a link
+ *
+ * valid options
+ * pageNumber or url [required]
+ * If pageNumber is specified, top and zoom may also be specified
+ * @name link
+ * @function
+ * @param {number} x
+ * @param {number} y
+ * @param {number} w
+ * @param {number} h
+ * @param {Object} options
*/
@@ -8376,17 +8085,17 @@
type: 'link'
});
};
- /**
- * Currently only supports single line text.
- * Returns the width of the text/link
- *
- * @name textWithLink
- * @function
- * @param {string} text
- * @param {number} x
- * @param {number} y
- * @param {Object} options
- * @returns {number} width the width of the text/link
+ /**
+ * Currently only supports single line text.
+ * Returns the width of the text/link
+ *
+ * @name textWithLink
+ * @function
+ * @param {string} text
+ * @param {number} x
+ * @param {number} y
+ * @param {Object} options
+ * @returns {number} width the width of the text/link
*/
@@ -8401,11 +8110,11 @@
return width;
}; //TODO move into external library
- /**
- * @name getTextWidth
- * @function
- * @param {string} text
- * @returns {number} txtWidth
+ /**
+ * @name getTextWidth
+ * @function
+ * @param {string} text
+ * @returns {number} txtWidth
*/
@@ -8418,24 +8127,24 @@
return this;
})(jsPDF.API);
- /**
- * @license
- * Copyright (c) 2017 Aras Abbasi
- *
- * Licensed under the MIT License.
- * http://opensource.org/licenses/mit-license
+ /**
+ * @license
+ * Copyright (c) 2017 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
*/
- /**
- * jsPDF arabic parser PlugIn
- *
- * @name arabic
- * @module
+ /**
+ * jsPDF arabic parser PlugIn
+ *
+ * @name arabic
+ * @module
*/
(function (jsPDFAPI) {
- /**
- * Arabic shape substitutions: char code => (isolated, final, initial, medial).
- * Arabic Substition A
+ /**
+ * Arabic shape substitutions: char code => (isolated, final, initial, medial).
+ * Arabic Substition A
*/
var arabicSubstitionA = {
@@ -8751,12 +8460,12 @@
return initialForm;
};
- /**
- * @name processArabic
- * @function
- * @param {string} text
- * @param {boolean} reverse
- * @returns {string}
+ /**
+ * @name processArabic
+ * @function
+ * @param {string} text
+ * @param {boolean} reverse
+ * @returns {string}
*/
@@ -8830,31 +8539,31 @@
jsPDFAPI.events.push(['preProcessText', arabicParserFunction]);
})(jsPDF.API);
- /** @license
- * jsPDF Autoprint Plugin
- *
- * Licensed under the MIT License.
- * http://opensource.org/licenses/mit-license
+ /** @license
+ * jsPDF Autoprint Plugin
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
*/
- /**
- * @name autoprint
- * @module
+ /**
+ * @name autoprint
+ * @module
*/
(function (jsPDFAPI) {
- /**
- * Makes the PDF automatically print. This works in Chrome, Firefox, Acrobat
- * Reader.
- *
- * @name autoPrint
- * @function
- * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .
- * @returns {jsPDF}
- * @example
- * var doc = new jsPDF();
- * doc.text(10, 10, 'This is a test');
- * doc.autoPrint({variant: 'non-conform'});
- * doc.save('autoprint.pdf');
+ /**
+ * Makes the PDF automatically print. This works in Chrome, Firefox, Acrobat
+ * Reader.
+ *
+ * @name autoPrint
+ * @function
+ * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .
+ * @returns {jsPDF}
+ * @example
+ * var doc = new jsPDF();
+ * doc.text(10, 10, 'This is a test');
+ * doc.autoPrint({variant: 'non-conform'});
+ * doc.save('autoprint.pdf');
*/
jsPDFAPI.autoPrint = function (options) {
@@ -8890,26 +8599,26 @@
};
})(jsPDF.API);
- /**
- * @license
- * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
- *
- * Licensed under the MIT License.
- * http://opensource.org/licenses/mit-license
+ /**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
*/
- /**
- * jsPDF Canvas PlugIn
- * This plugin mimics the HTML5 Canvas
- *
- * The goal is to provide a way for current canvas users to print directly to a PDF.
- * @name canvas
- * @module
+ /**
+ * jsPDF Canvas PlugIn
+ * This plugin mimics the HTML5 Canvas
+ *
+ * The goal is to provide a way for current canvas users to print directly to a PDF.
+ * @name canvas
+ * @module
*/
(function (jsPDFAPI) {
- /**
- * @class Canvas
- * @classdesc A Canvas Wrapper for jsPDF
+ /**
+ * @class Canvas
+ * @classdesc A Canvas Wrapper for jsPDF
*/
var Canvas = function Canvas() {
@@ -8923,11 +8632,11 @@
}
});
var _width = 150;
- /**
- * The height property is a positive integer reflecting the height HTML attribute of the