Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions dist/jspdf.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

/** @preserve
* jsPDF - PDF Document creation from JavaScript
* Version 1.2.61 Built on 2016-09-25T20:14:04.913Z
* CommitID e527636485
* Version 1.2.61 Built on 2016-09-25T22:32:35.622Z
* CommitID 33aab1469e
*
* Copyright (c) 2010-2014 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
* 2010 Aaron Spike, https://github.com/acspike
Expand Down Expand Up @@ -2026,7 +2026,7 @@
* pdfdoc.mymethod() // <- !!!!!!
*/
jsPDF.API = { events: [] };
jsPDF.version = "1.2.61 2016-09-25T20:14:04.913Z:jameshall";
jsPDF.version = "1.2.61 2016-09-25T22:32:35.622Z:jameshall";

if (typeof define === 'function' && define.amd) {
define('jsPDF', function () {
Expand Down Expand Up @@ -2172,7 +2172,7 @@
var standardFields = !fieldArray;

if (!fieldArray) {
// in case there is no fieldArray specified, we wanna print out the Fields of the AcroForm
// in case there is no fieldArray specified, we want to print out the Fields of the AcroForm
// Print out Root
this.internal.newObjectDeferredBegin(this.acroformPlugin.acroFormDictionaryRoot.objId);
this.internal.out(this.acroformPlugin.acroFormDictionaryRoot.getString());
Expand Down Expand Up @@ -3372,7 +3372,7 @@ Q\n";
// ############ internal functions

/*
* small workaround for calculating the TextMetric aproximately
* small workaround for calculating the TextMetric approximately
* @param text
* @param fontsize
* @returns {TextMetrics} (Has Height and Width)
Expand Down Expand Up @@ -3944,7 +3944,7 @@ Q\n";
},
createDataURIFromElement = function createDataURIFromElement(element, format, angle) {

//if element is an image which uses data url defintion, just return the dataurl
//if element is an image which uses data url definition, just return the dataurl
if (element.nodeName === 'IMG' && element.hasAttribute('src')) {
var src = '' + element.getAttribute('src');
if (!angle && src.indexOf('data:image/') === 0) return src;
Expand Down Expand Up @@ -4067,7 +4067,7 @@ Q\n";
ICC_BASED: 'ICCBased',
INDEXED: 'Indexed',
PATTERN: 'Pattern',
SEPERATION: 'Seperation',
SEPARATION: 'Separation',
DEVICE_N: 'DeviceN'
};

Expand Down Expand Up @@ -4343,7 +4343,7 @@ Q\n";
if (processMethodNotEnabled(format)) throw new Error('please ensure that the plugin for \'' + format + '\' support is added');

/**
* need to test if it's more efficent to convert all binary strings
* 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()) {
Expand Down Expand Up @@ -4954,7 +4954,7 @@ Q\n";
this.printHeaderRow(ln, true);
}
}
//We ignore the passed y: the lines may have diferent heights
//We ignore the passed y: the lines may have different heights
y = getLastCellPosition().y + getLastCellPosition().h;
if (pgAdded) y = margin + 10;
}
Expand Down Expand Up @@ -5066,7 +5066,7 @@ Q\n";
if (config.fontSize) {
fontSize = config.fontSize;
}
if (config.css['font-size']) {
if (config.css && typeof config.css['font-size'] !== "undefined") {
fontSize = config.css['font-size'] * 16;
}
if (config.margins) {
Expand Down Expand Up @@ -7258,7 +7258,7 @@ Q\n";
renderer.y = oldPosition;
};

//check if footer contains totalPages which shoudl be replace at the disoposal of the document
//check if footer contains totalPages which should be replace at the disoposal of the document
var spans = footer.getElementsByTagName('span');
for (var i = 0; i < spans.length; ++i) {
if ((" " + spans[i].className + " ").replace(/[\n\t]/g, " ").indexOf(" totalPages ") > -1) {
Expand Down Expand Up @@ -7582,13 +7582,13 @@ Q\n";
}
this.y += maxLineHeight * fontToUnitRatio;

//if some watcher function was executed sucessful, so e.g. margin and widths were changed,
//if some watcher function was executed successful, so e.g. margin and widths were changed,
//reset line drawing and calculate position and lines again
//e.g. to stop text floating around an image
if (this.executeWatchFunctions(line[0][1]) && lines.length > 0) {
var localFragments = [];
var localStyles = [];
//create fragement array of
//create fragment array of
lines.forEach(function (localLine) {
var i = 0;
var l = localLine.length;
Expand Down Expand Up @@ -8706,7 +8706,7 @@ Q\n";
/**
Splits a given string into an array of strings. Uses 'size' value
(in measurement units declared as default for the jsPDF instance)
and the font's "widths" and "Kerning" tables, where availabe, to
and the font's "widths" and "Kerning" tables, where available, to
determine display length of a given string for a given font.

We use character's 100% of unit size (height) as width when Width
Expand Down
6 changes: 3 additions & 3 deletions dist/jspdf.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ <h2><a href="#">Draw example: rectangles / squares</a></h2>

doc.setDrawColor(0);
doc.setFillColor(255, 255, 255);
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // Black sqaure with rounded corners
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // Black square with rounded corners

doc.save('Test.pdf');</pre>
<a href="javascript:demoRectangles()" class="button">Run Code</a></p></div>
Expand Down
2 changes: 1 addition & 1 deletion examples/js/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function demoRectangles() {

doc.setDrawColor(0);
doc.setFillColor(255, 255, 255);
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // Black sqaure with rounded corners
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // Black square with rounded corners

doc.save('Test.pdf');
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/acroform.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
var standardFields = (!fieldArray);

if (!fieldArray) {
// in case there is no fieldArray specified, we wanna print out the Fields of the AcroForm
// in case there is no fieldArray specified, we want to print out the Fields of the AcroForm
// Print out Root
this.internal.newObjectDeferredBegin(this.acroformPlugin.acroFormDictionaryRoot.objId);
this.internal.out(this.acroformPlugin.acroFormDictionaryRoot.getString());
Expand Down Expand Up @@ -1348,7 +1348,7 @@ window["PasswordField"] = AcroForm.PasswordField;
// ############ internal functions

/*
* small workaround for calculating the TextMetric aproximately
* small workaround for calculating the TextMetric approximately
* @param text
* @param fontsize
* @returns {TextMetrics} (Has Height and Width)
Expand Down
6 changes: 3 additions & 3 deletions plugins/addimage.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
}
, createDataURIFromElement = function(element, format, angle) {

//if element is an image which uses data url defintion, just return the dataurl
//if element is an image which uses data url definition, just return the dataurl
if (element.nodeName === 'IMG' && element.hasAttribute('src')) {
var src = ''+element.getAttribute('src');
if (!angle && src.indexOf('data:image/') === 0) return src;
Expand Down Expand Up @@ -294,7 +294,7 @@
ICC_BASED:'ICCBased',
INDEXED:'Indexed',
PATTERN:'Pattern',
SEPERATION:'Seperation',
SEPARATION:'Separation',
DEVICE_N:'DeviceN'
};

Expand Down Expand Up @@ -587,7 +587,7 @@
throw new Error('please ensure that the plugin for \''+format+'\' support is added');

/**
* need to test if it's more efficent to convert all binary strings
* 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()) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
this.printHeaderRow(ln, true);
}
}
//We ignore the passed y: the lines may have diferent heights
//We ignore the passed y: the lines may have different heights
y = (getLastCellPosition().y + getLastCellPosition().h);
if (pgAdded) y = margin + 10;
}
Expand Down
6 changes: 3 additions & 3 deletions plugins/from_html.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@
renderer.y = oldPosition;
};

//check if footer contains totalPages which shoudl be replace at the disoposal of the document
//check if footer contains totalPages which should be replace at the disoposal of the document
var spans = footer.getElementsByTagName('span');
for (var i = 0; i < spans.length; ++i) {
if ((" " + spans[i].className + " ").replace(/[\n\t]/g, " ").indexOf(" totalPages ") > -1) {
Expand Down Expand Up @@ -964,13 +964,13 @@
}
this.y += maxLineHeight * fontToUnitRatio;

//if some watcher function was executed sucessful, so e.g. margin and widths were changed,
//if some watcher function was executed successful, so e.g. margin and widths were changed,
//reset line drawing and calculate position and lines again
//e.g. to stop text floating around an image
if (this.executeWatchFunctions(line[0][1]) && lines.length > 0) {
var localFragments = [];
var localStyles = [];
//create fragement array of
//create fragment array of
lines.forEach(function(localLine) {
var i = 0;
var l = localLine.length;
Expand Down
2 changes: 1 addition & 1 deletion plugins/split_text_to_size.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ var splitParagraphIntoLines = function(text, maxlen, options){
/**
Splits a given string into an array of strings. Uses 'size' value
(in measurement units declared as default for the jsPDF instance)
and the font's "widths" and "Kerning" tables, where availabe, to
and the font's "widths" and "Kerning" tables, where available, to
determine display length of a given string for a given font.

We use character's 100% of unit size (height) as width when Width
Expand Down