|
12 | 12 |
|
13 | 13 | /** @preserve |
14 | 14 | * jsPDF - PDF Document creation from JavaScript |
15 | | - * Version 1.2.61 Built on 2016-09-25T20:14:04.913Z |
16 | | - * CommitID e527636485 |
| 15 | + * Version 1.2.61 Built on 2016-09-25T22:32:35.622Z |
| 16 | + * CommitID 33aab1469e |
17 | 17 | * |
18 | 18 | * Copyright (c) 2010-2014 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF |
19 | 19 | * 2010 Aaron Spike, https://github.com/acspike |
|
2026 | 2026 | * pdfdoc.mymethod() // <- !!!!!! |
2027 | 2027 | */ |
2028 | 2028 | jsPDF.API = { events: [] }; |
2029 | | - jsPDF.version = "1.2.61 2016-09-25T20:14:04.913Z:jameshall"; |
| 2029 | + jsPDF.version = "1.2.61 2016-09-25T22:32:35.622Z:jameshall"; |
2030 | 2030 |
|
2031 | 2031 | if (typeof define === 'function' && define.amd) { |
2032 | 2032 | define('jsPDF', function () { |
|
2172 | 2172 | var standardFields = !fieldArray; |
2173 | 2173 |
|
2174 | 2174 | if (!fieldArray) { |
2175 | | - // in case there is no fieldArray specified, we wanna print out the Fields of the AcroForm |
| 2175 | + // in case there is no fieldArray specified, we want to print out the Fields of the AcroForm |
2176 | 2176 | // Print out Root |
2177 | 2177 | this.internal.newObjectDeferredBegin(this.acroformPlugin.acroFormDictionaryRoot.objId); |
2178 | 2178 | this.internal.out(this.acroformPlugin.acroFormDictionaryRoot.getString()); |
@@ -3372,7 +3372,7 @@ Q\n"; |
3372 | 3372 | // ############ internal functions |
3373 | 3373 |
|
3374 | 3374 | /* |
3375 | | - * small workaround for calculating the TextMetric aproximately |
| 3375 | + * small workaround for calculating the TextMetric approximately |
3376 | 3376 | * @param text |
3377 | 3377 | * @param fontsize |
3378 | 3378 | * @returns {TextMetrics} (Has Height and Width) |
@@ -3944,7 +3944,7 @@ Q\n"; |
3944 | 3944 | }, |
3945 | 3945 | createDataURIFromElement = function createDataURIFromElement(element, format, angle) { |
3946 | 3946 |
|
3947 | | - //if element is an image which uses data url defintion, just return the dataurl |
| 3947 | + //if element is an image which uses data url definition, just return the dataurl |
3948 | 3948 | if (element.nodeName === 'IMG' && element.hasAttribute('src')) { |
3949 | 3949 | var src = '' + element.getAttribute('src'); |
3950 | 3950 | if (!angle && src.indexOf('data:image/') === 0) return src; |
@@ -4067,7 +4067,7 @@ Q\n"; |
4067 | 4067 | ICC_BASED: 'ICCBased', |
4068 | 4068 | INDEXED: 'Indexed', |
4069 | 4069 | PATTERN: 'Pattern', |
4070 | | - SEPERATION: 'Seperation', |
| 4070 | + SEPARATION: 'Separation', |
4071 | 4071 | DEVICE_N: 'DeviceN' |
4072 | 4072 | }; |
4073 | 4073 |
|
@@ -4343,7 +4343,7 @@ Q\n"; |
4343 | 4343 | if (processMethodNotEnabled(format)) throw new Error('please ensure that the plugin for \'' + format + '\' support is added'); |
4344 | 4344 |
|
4345 | 4345 | /** |
4346 | | - * need to test if it's more efficent to convert all binary strings |
| 4346 | + * need to test if it's more efficient to convert all binary strings |
4347 | 4347 | * to TypedArray - or should we just leave and process as string? |
4348 | 4348 | */ |
4349 | 4349 | if (this.supportsArrayBuffer()) { |
@@ -4954,7 +4954,7 @@ Q\n"; |
4954 | 4954 | this.printHeaderRow(ln, true); |
4955 | 4955 | } |
4956 | 4956 | } |
4957 | | - //We ignore the passed y: the lines may have diferent heights |
| 4957 | + //We ignore the passed y: the lines may have different heights |
4958 | 4958 | y = getLastCellPosition().y + getLastCellPosition().h; |
4959 | 4959 | if (pgAdded) y = margin + 10; |
4960 | 4960 | } |
@@ -5066,7 +5066,7 @@ Q\n"; |
5066 | 5066 | if (config.fontSize) { |
5067 | 5067 | fontSize = config.fontSize; |
5068 | 5068 | } |
5069 | | - if (config.css['font-size']) { |
| 5069 | + if (config.css && typeof config.css['font-size'] !== "undefined") { |
5070 | 5070 | fontSize = config.css['font-size'] * 16; |
5071 | 5071 | } |
5072 | 5072 | if (config.margins) { |
@@ -7258,7 +7258,7 @@ Q\n"; |
7258 | 7258 | renderer.y = oldPosition; |
7259 | 7259 | }; |
7260 | 7260 |
|
7261 | | - //check if footer contains totalPages which shoudl be replace at the disoposal of the document |
| 7261 | + //check if footer contains totalPages which should be replace at the disoposal of the document |
7262 | 7262 | var spans = footer.getElementsByTagName('span'); |
7263 | 7263 | for (var i = 0; i < spans.length; ++i) { |
7264 | 7264 | if ((" " + spans[i].className + " ").replace(/[\n\t]/g, " ").indexOf(" totalPages ") > -1) { |
@@ -7582,13 +7582,13 @@ Q\n"; |
7582 | 7582 | } |
7583 | 7583 | this.y += maxLineHeight * fontToUnitRatio; |
7584 | 7584 |
|
7585 | | - //if some watcher function was executed sucessful, so e.g. margin and widths were changed, |
| 7585 | + //if some watcher function was executed successful, so e.g. margin and widths were changed, |
7586 | 7586 | //reset line drawing and calculate position and lines again |
7587 | 7587 | //e.g. to stop text floating around an image |
7588 | 7588 | if (this.executeWatchFunctions(line[0][1]) && lines.length > 0) { |
7589 | 7589 | var localFragments = []; |
7590 | 7590 | var localStyles = []; |
7591 | | - //create fragement array of |
| 7591 | + //create fragment array of |
7592 | 7592 | lines.forEach(function (localLine) { |
7593 | 7593 | var i = 0; |
7594 | 7594 | var l = localLine.length; |
@@ -8706,7 +8706,7 @@ Q\n"; |
8706 | 8706 | /** |
8707 | 8707 | Splits a given string into an array of strings. Uses 'size' value |
8708 | 8708 | (in measurement units declared as default for the jsPDF instance) |
8709 | | - and the font's "widths" and "Kerning" tables, where availabe, to |
| 8709 | + and the font's "widths" and "Kerning" tables, where available, to |
8710 | 8710 | determine display length of a given string for a given font. |
8711 | 8711 |
|
8712 | 8712 | We use character's 100% of unit size (height) as width when Width |
|
0 commit comments