Skip to content

Commit

Permalink
Update deps, update copyright notice
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRio committed Feb 29, 2016
1 parent b4c1e2c commit bd6d9fc
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 31 deletions.
2 changes: 1 addition & 1 deletion MIT-LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2010-2015 James Hall, https://github.com/MrRio/jsPDF
Copyright (c) 2010-2016 James Hall, https://github.com/MrRio/jsPDF

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**Generate PDF files in client-side JavaScript.**

You can [catch me on twitter](http://twitter.com/MrRio): [@MrRio](http://twitter.com/MrRio) or head over to [my company's website](http://parall.ax) for consultancy.
You can [catch me on twitter](http://twitter.com/MrRio): [@MrRio](http://twitter.com/MrRio) or head over to [my company's website](http://parall.ax) for consultancy.

## Creating your first document

Expand Down Expand Up @@ -41,7 +41,7 @@ You can then access the site at localhost:8000

## Credits

Big thanks to Daniel Dotsenko from [Willow Systems Corporation](http://willow-systems.com) for making huge contributions to the codebase.
Big thanks to Daniel Dotsenko from [Willow Systems Corporation](http://willow-systems.com) for making huge contributions to the codebase.

Thanks to Ajaxian.com for [featuring us back in 2009](http://ajaxian.com/archives/dynamically-generic-pdfs-with-javascript).

Expand All @@ -51,7 +51,7 @@ Everyone else that's contributed patches or bug reports. You rock.

(MIT License)

Copyright (c) 2010-2014 James Hall, https://github.com/MrRio/jsPDF
Copyright (c) 2010-2016 James Hall, https://github.com/MrRio/jsPDF

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion bower.json.bak
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.1.135",
"homepage": "https://github.com/mrrio/jspdf",
"description": "PDF Document creation from JavaScript",
"main": "dist/jspdf.min.js",
"main": "dist/jspdf.debug.js",
"moduleType": [
"amd",
"globals"
Expand Down
34 changes: 25 additions & 9 deletions dist/jspdf.debug.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @preserve
* jsPDF - PDF Document creation from JavaScript
* Version 1.1.239-git Built on 2015-08-26T20:20
* CommitID 6b73dc2e73
* Version 1.2.60-git Built on 2016-02-29T13:00
* CommitID ddf1da50b6
*
* 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 @@ -781,11 +781,13 @@ var jsPDF = (function(global) {
case 'sans-serif':
case 'verdana':
case 'arial':
case 'helvetica':
fontName = 'helvetica';
break;
case 'fixed':
case 'monospace':
case 'terminal':
case 'courier':
fontName = 'courier';
break;
case 'serif':
Expand Down Expand Up @@ -2035,7 +2037,7 @@ var jsPDF = (function(global) {
* pdfdoc.mymethod() // <- !!!!!!
*/
jsPDF.API = {events:[]};
jsPDF.version = "1.1.239-debug 2015-08-26T20:20:danielzamorano";
jsPDF.version = "1.2.60-debug 2016-02-29T13:00:jameshall";

if (typeof define === 'function' && define.amd) {
define('jsPDF', function() {
Expand Down Expand Up @@ -7273,7 +7275,7 @@ jsPDFAPI.putTotalPages = function(pageExpression) {
*
* By Eli Grey, http://eligrey.com
* By Devin Samarin, https://github.com/dsamarin
* License: X11/MIT
* License: MIT
* See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
*/

Expand Down Expand Up @@ -7480,10 +7482,10 @@ jsPDFAPI.putTotalPages = function(pageExpression) {
}(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this));
/* FileSaver.js
* A saveAs() FileSaver implementation.
* 1.1.20150716
* 1.1.20151003
*
* By Eli Grey, http://eligrey.com
* License: X11/MIT
* License: MIT
* See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
*/

Expand All @@ -7510,6 +7512,7 @@ var saveAs = saveAs || (function(view) {
var event = new MouseEvent("click");
node.dispatchEvent(event);
}
, is_safari = /Version\/[\d\.]+.*Safari/.test(navigator.userAgent)
, webkit_req_fs = view.webkitRequestFileSystem
, req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem
, throw_outside = function(ex) {
Expand Down Expand Up @@ -7574,6 +7577,19 @@ var saveAs = saveAs || (function(view) {
}
// on any filesys errors revert to saving with object URLs
, fs_error = function() {
if (target_view && is_safari && typeof FileReader !== "undefined") {
// Safari doesn't allow downloading of blob urls
var reader = new FileReader();
reader.onloadend = function() {
var base64Data = reader.result;
target_view.location.href = "data:attachment/file" + base64Data.slice(base64Data.search(/[,;]/));
filesaver.readyState = filesaver.DONE;
dispatch_all();
};
reader.readAsDataURL(blob);
filesaver.readyState = filesaver.INIT;
return;
}
// don't create more object URLs than needed
if (blob_changed || !object_url) {
object_url = get_URL().createObjectURL(blob);
Expand All @@ -7582,7 +7598,7 @@ var saveAs = saveAs || (function(view) {
target_view.location.href = object_url;
} else {
var new_tab = view.open(object_url, "_blank");
if (new_tab == undefined && typeof safari !== "undefined") {
if (new_tab == undefined && is_safari) {
//Apple do not allow window.open, see http://bit.ly/1kZffRI
view.location.href = object_url
}
Expand All @@ -7607,9 +7623,9 @@ var saveAs = saveAs || (function(view) {
}
if (can_use_save_link) {
object_url = get_URL().createObjectURL(blob);
save_link.href = object_url;
save_link.download = name;
setTimeout(function() {
save_link.href = object_url;
save_link.download = name;
click(save_link);
dispatch_all();
revoke(object_url);
Expand Down
28 changes: 14 additions & 14 deletions dist/jspdf.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h2>License</h2>

<p>(MIT License)</p>

<p>Copyright (c) 2010-2012 James Hall, <a href="https://github.com/MrRio/jsPDF">https://github.com/MrRio/jsPDF</a></p>
<p>Copyright (c) 2010-2016 James Hall, <a href="https://github.com/MrRio/jsPDF">https://github.com/MrRio/jsPDF</a></p>

<p>Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand All @@ -139,7 +139,7 @@ <h2>License</h2>

</div> <!-- /container -->

<footer>&copy; 2013 James Hall - <a href="http://snapshotmedia.co.uk/privacy-policy">Privacy Policy</a></footer>
<footer>&copy; 2016 James Hall - <a href="https://parall.ax/pages/privacy-policy">Privacy Policy</a></footer>

<!-- Scripts down here -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion libs/Blob.js
Submodule Blob.js updated 1 files
+1 −1 Blob.js

0 comments on commit bd6d9fc

Please sign in to comment.