This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
forked from parallax/jsPDF
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
339f704
commit 3561de8
Showing
6 changed files
with
94 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,7 +263,7 @@ | |
// 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(); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : typeof define === 'function' && define.amd ? define('PromisePolyFill', factory) : factory(); | ||
})(window, function () { | ||
/** | ||
* @this {Promise} | ||
|
@@ -568,8 +568,8 @@ | |
|
||
/** @license | ||
* jsPDF - PDF Document creation from JavaScript | ||
* Version 2.0.0 Built on 2019-01-22T15:32:38.220Z | ||
* CommitID 0110a2202b | ||
* Version 2.0.2 Built on 2019-05-06T09:38:53.381Z | ||
* CommitID 339f704ec3 | ||
* | ||
* Copyright (c) 2015-2018 yWorks GmbH, http://www.yworks.com | ||
* 2015-2018 Lukas Holländer <[email protected]>, https://github.com/HackbrettXXX | ||
|
@@ -615,7 +615,8 @@ | |
* orientation: 'p', | ||
* unit: 'mm', | ||
* format: 'a4', | ||
* hotfixes: [] // an array of hotfix strings to enable | ||
* hotfixes: [], // an array of hotfix strings to enable, | ||
* floatPrecision: 16 // or "smart", default is 16 | ||
* } | ||
* ``` | ||
*/ | ||
|
@@ -751,6 +752,7 @@ | |
|
||
var format_as_string = ("" + format).toLowerCase(), | ||
compress = !!compressPdf && typeof Uint8Array === "function", | ||
floatPrecision = options.floatPrecision || 16, | ||
textColor = options.textColor || "0 g", | ||
drawColor = options.drawColor || "0 G", | ||
activeFontSize = options.fontSize || 16, | ||
|
@@ -982,12 +984,26 @@ | |
}, | ||
f3 = function f3(number) { | ||
return number.toFixed(3); // Ie, %.3f | ||
}, | ||
// high precision float | ||
hpf = function hpf(number) { | ||
return number.toFixed(16).replace(/0+$/, ""); | ||
}, | ||
scaleByK = function scaleByK(coordinate) { | ||
}; // high precision float | ||
|
||
|
||
var hpf; | ||
|
||
if (typeof floatPrecision === "number") { | ||
hpf = function hpf(number) { | ||
return number.toFixed(floatPrecision).replace(/0+$/, ""); | ||
}; | ||
} else if (floatPrecision === "smart") { | ||
hpf = function hpf(number) { | ||
if (number > -1 && number < 1) { | ||
return number.toFixed(16).replace(/0+$/, ""); | ||
} else { | ||
return number.toFixed(5).replace(/0+$/, ""); | ||
} | ||
}; | ||
} | ||
|
||
var scaleByK = function scaleByK(coordinate) { | ||
if (apiMode === ApiMode.COMPAT) { | ||
return coordinate * k; | ||
} else if (apiMode === ApiMode.ADVANCED) { | ||
|
@@ -1137,7 +1153,7 @@ | |
strings.push(String.fromCharCode.apply(null, arr.subarray(j * chunkSize, (j + 1) * chunkSize))); | ||
} | ||
|
||
p = strings.join(''); | ||
p = strings.join(""); | ||
out("<</Length " + p.length + " /Filter [/FlateDecode]>>"); | ||
} else { | ||
out("<</Length " + p.length + ">>"); | ||
|
@@ -4887,10 +4903,10 @@ | |
* @memberOf jsPDF | ||
*/ | ||
|
||
jsPDF.version = "0.0.0"; | ||
jsPDF.version = '2.0.2'; | ||
|
||
if (typeof define === "function" && define.amd) { | ||
define(function () { | ||
define('jsPDF', function () { | ||
return jsPDF; | ||
}); | ||
} else if (typeof module !== "undefined" && module.exports) { | ||
|
@@ -21625,3 +21641,8 @@ | |
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}))); | ||
|
||
try { | ||
module.exports = jsPDF; | ||
} | ||
catch (e) {} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,8 @@ | |
|
||
/** @license | ||
* jsPDF - PDF Document creation from JavaScript | ||
* Version 2.0.0 Built on 2019-01-22T15:32:43.086Z | ||
* CommitID 0110a2202b | ||
* Version 2.0.2 Built on 2019-05-06T09:38:58.181Z | ||
* CommitID 339f704ec3 | ||
* | ||
* Copyright (c) 2015-2018 yWorks GmbH, http://www.yworks.com | ||
* 2015-2018 Lukas Holländer <[email protected]>, https://github.com/HackbrettXXX | ||
|
@@ -67,7 +67,8 @@ | |
* orientation: 'p', | ||
* unit: 'mm', | ||
* format: 'a4', | ||
* hotfixes: [] // an array of hotfix strings to enable | ||
* hotfixes: [], // an array of hotfix strings to enable, | ||
* floatPrecision: 16 // or "smart", default is 16 | ||
* } | ||
* ``` | ||
*/ | ||
|
@@ -203,6 +204,7 @@ | |
|
||
var format_as_string = ("" + format).toLowerCase(), | ||
compress = !!compressPdf && typeof Uint8Array === "function", | ||
floatPrecision = options.floatPrecision || 16, | ||
textColor = options.textColor || "0 g", | ||
drawColor = options.drawColor || "0 G", | ||
activeFontSize = options.fontSize || 16, | ||
|
@@ -434,12 +436,26 @@ | |
}, | ||
f3 = function f3(number) { | ||
return number.toFixed(3); // Ie, %.3f | ||
}, | ||
// high precision float | ||
hpf = function hpf(number) { | ||
return number.toFixed(16).replace(/0+$/, ""); | ||
}, | ||
scaleByK = function scaleByK(coordinate) { | ||
}; // high precision float | ||
|
||
|
||
var hpf; | ||
|
||
if (typeof floatPrecision === "number") { | ||
hpf = function hpf(number) { | ||
return number.toFixed(floatPrecision).replace(/0+$/, ""); | ||
}; | ||
} else if (floatPrecision === "smart") { | ||
hpf = function hpf(number) { | ||
if (number > -1 && number < 1) { | ||
return number.toFixed(16).replace(/0+$/, ""); | ||
} else { | ||
return number.toFixed(5).replace(/0+$/, ""); | ||
} | ||
}; | ||
} | ||
|
||
var scaleByK = function scaleByK(coordinate) { | ||
if (apiMode === ApiMode.COMPAT) { | ||
return coordinate * k; | ||
} else if (apiMode === ApiMode.ADVANCED) { | ||
|
@@ -589,7 +605,7 @@ | |
strings.push(String.fromCharCode.apply(null, arr.subarray(j * chunkSize, (j + 1) * chunkSize))); | ||
} | ||
|
||
p = strings.join(''); | ||
p = strings.join(""); | ||
out("<</Length " + p.length + " /Filter [/FlateDecode]>>"); | ||
} else { | ||
out("<</Length " + p.length + ">>"); | ||
|
@@ -4339,10 +4355,10 @@ | |
* @memberOf jsPDF | ||
*/ | ||
|
||
jsPDF.version = "0.0.0"; | ||
jsPDF.version = '2.0.2'; | ||
|
||
if (typeof define === "function" && define.amd) { | ||
define(function () { | ||
define('jsPDF', function () { | ||
return jsPDF; | ||
}); | ||
} else if (typeof module !== "undefined" && module.exports) { | ||
|
@@ -19847,3 +19863,8 @@ | |
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}))); | ||
|
||
try { | ||
module.exports = jsPDF; | ||
} | ||
catch (e) {} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters