Skip to content

Commit

Permalink
2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
HackbrettXXX committed Jan 28, 2022
1 parent a56c882 commit 7315ccb
Show file tree
Hide file tree
Showing 105 changed files with 231 additions and 199 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -29,7 +29,7 @@ yarn add jspdf
Alternatively, load it from a CDN:

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.0/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
```

Or always get latest version via [unpkg](https://unpkg.com/browse/jspdf/)
Expand Down Expand Up @@ -178,7 +178,7 @@ Alternatively, you can load the prebundled polyfill file. This is not recommende
loading polyfills multiple times. Might still be nifty for small applications or quick POCs.

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.0/polyfills.umd.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/polyfills.umd.js"></script>
```

## Use of Unicode Characters / UTF-8:
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "jspdf",
"version": "2.5.0",
"version": "2.5.1",
"homepage": "https://github.com/mrrio/jspdf",
"description": "PDF Document creation from JavaScript",
"main": [
Expand Down
17 changes: 12 additions & 5 deletions dist/jspdf.es.js
@@ -1,7 +1,7 @@
/** @license
*
* jsPDF - PDF Document creation from JavaScript
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
* CommitID 00000000
*
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
Expand Down Expand Up @@ -1794,7 +1794,7 @@ function jsPDF(options) {
var setZoomMode = API.__private__.setZoomMode = function (zoom) {
var validZoomModes = [undefined, null, "fullwidth", "fullheight", "fullpage", "original"];

if (/^\d*\.?\d*%$/.test(zoom)) {
if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(zoom)) {
zoomMode = zoom;
} else if (!isNaN(zoom)) {
zoomMode = parseInt(zoom, 10);
Expand Down Expand Up @@ -3876,8 +3876,15 @@ function jsPDF(options) {

case "pdfobjectnewwindow":
if (Object.prototype.toString.call(globalObject) === "[object Window]") {
var pdfObjectUrl = options.pdfObjectUrl || "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js";
var htmlForNewWindow = "<html>" + '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="' + pdfObjectUrl + '"></script><script >PDFObject.embed("' + this.output("dataurlstring") + '", ' + JSON.stringify(options) + ");</script></body></html>";
var pdfObjectUrl = "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js";
var integrity = ' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';

if (options.pdfObjectUrl) {
pdfObjectUrl = options.pdfObjectUrl;
integrity = "";
}

var htmlForNewWindow = "<html>" + '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="' + pdfObjectUrl + '"' + integrity + '></script><script >PDFObject.embed("' + this.output("dataurlstring") + '", ' + JSON.stringify(options) + ");</script></body></html>";
var nW = globalObject.open();

if (nW !== null) {
Expand Down Expand Up @@ -6642,7 +6649,7 @@ jsPDF.API = {
* @memberof jsPDF#
*/

jsPDF.version = "2.5.0";
jsPDF.version = "2.5.1";

var jsPDFAPI = jsPDF.API;
var scaleFactor = 1;
Expand Down
2 changes: 1 addition & 1 deletion dist/jspdf.es.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/jspdf.es.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jspdf.es.min.js.map

Large diffs are not rendered by default.

19 changes: 14 additions & 5 deletions dist/jspdf.node.js
@@ -1,7 +1,7 @@
/** @license
*
* jsPDF - PDF Document creation from JavaScript
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
* CommitID 00000000
*
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
Expand Down Expand Up @@ -1714,7 +1714,7 @@ function jsPDF(options) {
"original"
];

if (/^\d*\.?\d*%$/.test(zoom)) {
if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(zoom)) {
zoomMode = zoom;
} else if (!isNaN(zoom)) {
zoomMode = parseInt(zoom, 10);
Expand Down Expand Up @@ -3913,13 +3913,22 @@ function jsPDF(options) {
Object.prototype.toString.call(globalObject) === "[object Window]"
) {
var pdfObjectUrl =
options.pdfObjectUrl ||
"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js";
var integrity =
' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';

if (options.pdfObjectUrl) {
pdfObjectUrl = options.pdfObjectUrl;
integrity = "";
}

var htmlForNewWindow =
"<html>" +
'<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="' +
pdfObjectUrl +
'"></script><script >PDFObject.embed("' +
'"' +
integrity +
'></script><script >PDFObject.embed("' +
this.output("dataurlstring") +
'", ' +
JSON.stringify(options) +
Expand Down Expand Up @@ -6852,7 +6861,7 @@ jsPDF.API = {
* @type {string}
* @memberof jsPDF#
*/
jsPDF.version = "2.5.0";
jsPDF.version = "2.5.1";

/* global jsPDF */

Expand Down
2 changes: 1 addition & 1 deletion dist/jspdf.node.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/jspdf.node.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jspdf.node.min.js.map

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions dist/jspdf.umd.js
@@ -1,7 +1,7 @@
/** @license
*
* jsPDF - PDF Document creation from JavaScript
* Version 2.5.0 Built on 2021-12-21T09:44:51.864Z
* Version 2.5.1 Built on 2022-01-28T15:37:57.789Z
* CommitID 00000000
*
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
Expand Down Expand Up @@ -1813,7 +1813,7 @@
var setZoomMode = API.__private__.setZoomMode = function (zoom) {
var validZoomModes = [undefined, null, "fullwidth", "fullheight", "fullpage", "original"];

if (/^\d*\.?\d*%$/.test(zoom)) {
if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(zoom)) {
zoomMode = zoom;
} else if (!isNaN(zoom)) {
zoomMode = parseInt(zoom, 10);
Expand Down Expand Up @@ -3895,8 +3895,15 @@

case "pdfobjectnewwindow":
if (Object.prototype.toString.call(globalObject) === "[object Window]") {
var pdfObjectUrl = options.pdfObjectUrl || "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js";
var htmlForNewWindow = "<html>" + '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="' + pdfObjectUrl + '"></script><script >PDFObject.embed("' + this.output("dataurlstring") + '", ' + JSON.stringify(options) + ");</script></body></html>";
var pdfObjectUrl = "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js";
var integrity = ' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';

if (options.pdfObjectUrl) {
pdfObjectUrl = options.pdfObjectUrl;
integrity = "";
}

var htmlForNewWindow = "<html>" + '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="' + pdfObjectUrl + '"' + integrity + '></script><script >PDFObject.embed("' + this.output("dataurlstring") + '", ' + JSON.stringify(options) + ");</script></body></html>";
var nW = globalObject.open();

if (nW !== null) {
Expand Down Expand Up @@ -6661,7 +6668,7 @@
* @memberof jsPDF#
*/

jsPDF.version = "2.5.0";
jsPDF.version = "2.5.1";

var jsPDFAPI = jsPDF.API;
var scaleFactor = 1;
Expand Down
2 changes: 1 addition & 1 deletion dist/jspdf.umd.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/jspdf.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jspdf.umd.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/polyfills.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/polyfills.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/GState.html
Expand Up @@ -71,7 +71,7 @@ <h4 class="name" id="GState"><span class="type-signature"></span>new GState<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jspdf.js.html">jspdf.js</a>, <a href="jspdf.js.html#line5431">line 5431</a>
<a href="jspdf.js.html">jspdf.js</a>, <a href="jspdf.js.html#line5440">line 5440</a>
</li></ul></dd>


Expand Down Expand Up @@ -458,7 +458,7 @@ <h5>Type:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Tue Dec 21 2021 10:45:12 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri Jan 28 2022 16:38:20 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Matrix.html
Expand Up @@ -1753,7 +1753,7 @@ <h4 class="name" id="toString"><span class="type-signature"></span>toString<span
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Tue Dec 21 2021 10:45:12 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri Jan 28 2022 16:38:20 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
4 changes: 2 additions & 2 deletions docs/global.html
Expand Up @@ -2117,7 +2117,7 @@ <h4 class="name" id="PatternData">PatternData</h4>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jspdf.js.html">jspdf.js</a>, <a href="jspdf.js.html#line4452">line 4452</a>
<a href="jspdf.js.html">jspdf.js</a>, <a href="jspdf.js.html#line4461">line 4461</a>
</li></ul></dd>


Expand Down Expand Up @@ -2198,7 +2198,7 @@ <h5>Type:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Tue Dec 21 2021 10:45:12 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri Jan 28 2022 16:38:20 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Expand Up @@ -76,7 +76,7 @@ <h2>Install</h2>
yarn add jspdf
</code></pre>
<p>Alternatively, load it from a CDN:</p>
<pre class="prettyprint source lang-html"><code>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.0/jspdf.umd.min.js&quot;>&lt;/script>
<pre class="prettyprint source lang-html"><code>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js&quot;>&lt;/script>
</code></pre>
<p>Or always get latest version via <a href="https://unpkg.com/browse/jspdf/">unpkg</a></p>
<pre class="prettyprint source lang-html"><code>&lt;script src=&quot;https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js&quot;>&lt;/script>
Expand Down Expand Up @@ -181,7 +181,7 @@ <h3>Polyfills</h3>
</code></pre>
<p>Alternatively, you can load the prebundled polyfill file. This is not recommended, since you might end up
loading polyfills multiple times. Might still be nifty for small applications or quick POCs.</p>
<pre class="prettyprint source lang-html"><code>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.0/polyfills.umd.js&quot;>&lt;/script>
<pre class="prettyprint source lang-html"><code>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/polyfills.umd.js&quot;>&lt;/script>
</code></pre>
<h2>Use of Unicode Characters / UTF-8:</h2>
<p>The 14 standard fonts in PDF are limited to the ASCII-codepage. If you want to use UTF-8 you have to integrate a
Expand Down Expand Up @@ -280,7 +280,7 @@ <h2>License (MIT)</h2>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Tue Dec 21 2021 10:45:12 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri Jan 28 2022 16:38:20 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
4 changes: 2 additions & 2 deletions docs/jsPDF-API.GState.html
Expand Up @@ -71,7 +71,7 @@ <h4 class="name" id="GState"><span class="type-signature"></span>new GState<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jspdf.js.html">jspdf.js</a>, <a href="jspdf.js.html#line5442">line 5442</a>
<a href="jspdf.js.html">jspdf.js</a>, <a href="jspdf.js.html#line5451">line 5451</a>
</li></ul></dd>


Expand Down Expand Up @@ -219,7 +219,7 @@ <h5>Parameters:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Tue Dec 21 2021 10:45:12 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri Jan 28 2022 16:38:20 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsPDF-API.ShadingPattern.html
Expand Up @@ -380,7 +380,7 @@ <h3 class="subsection-title">Extends</h3>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Tue Dec 21 2021 10:45:12 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri Jan 28 2022 16:38:20 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsPDF-API.TilingPattern.html
Expand Up @@ -378,7 +378,7 @@ <h3 class="subsection-title">Extends</h3>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Tue Dec 21 2021 10:45:12 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri Jan 28 2022 16:38:20 GMT+0100 (Central European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down

0 comments on commit 7315ccb

Please sign in to comment.