1
1
/** @preserve
2
2
* jsPDF - PDF Document creation from JavaScript
3
- * Version 1.0.118 -git Built on 2014-04-28T19:38
4
- * CommitID ce42cbafba
3
+ * Version 1.0.119 -git Built on 2014-04-29T03:48
4
+ * CommitID 119a246e55
5
5
*
6
6
* Copyright (c) 2010-2014 James Hall, https://github.com/MrRio/jsPDF
7
7
* 2010 Aaron Spike, https://github.com/acspike
@@ -556,7 +556,7 @@ var jsPDF = (function(global) {
556
556
bch = ch >> 8 ; // divide by 256
557
557
if ( bch >> 8 ) {
558
558
/* something left after dividing by 256 second time */
559
- throw new Error ( "Character at position " + i . toString ( 10 ) + " of string '"
559
+ throw new Error ( "Character at position " + i + " of string '"
560
560
+ text + "' exceeds 16bits. Cannot be encoded into UCS-2 BE" ) ;
561
561
}
562
562
newtext . push ( bch ) ;
@@ -624,10 +624,10 @@ var jsPDF = (function(global) {
624
624
out ( drawColor ) ;
625
625
// resurrecting non-default line caps, joins
626
626
if ( lineCapID !== 0 ) {
627
- out ( lineCapID . toString ( 10 ) + ' J' ) ;
627
+ out ( lineCapID + ' J' ) ;
628
628
}
629
629
if ( lineJoinID !== 0 ) {
630
- out ( lineJoinID . toString ( 10 ) + ' j' ) ;
630
+ out ( lineJoinID + ' j' ) ;
631
631
}
632
632
events . publish ( 'addPage' , { pageNumber : page } ) ;
633
633
} ,
@@ -1576,7 +1576,7 @@ var jsPDF = (function(global) {
1576
1576
throw new Error ( "Line cap style of '" + style + "' is not recognized. See or extend .CapJoinStyles property for valid styles" ) ;
1577
1577
}
1578
1578
lineCapID = id ;
1579
- out ( id . toString ( 10 ) + ' J' ) ;
1579
+ out ( id + ' J' ) ;
1580
1580
1581
1581
return this ;
1582
1582
} ;
@@ -1597,7 +1597,7 @@ var jsPDF = (function(global) {
1597
1597
throw new Error ( "Line join style of '" + style + "' is not recognized. See or extend .CapJoinStyles property for valid styles" ) ;
1598
1598
}
1599
1599
lineJoinID = id ;
1600
- out ( id . toString ( 10 ) + ' j' ) ;
1600
+ out ( id + ' j' ) ;
1601
1601
1602
1602
return this ;
1603
1603
} ;
@@ -1693,7 +1693,7 @@ var jsPDF = (function(global) {
1693
1693
* pdfdoc.mymethod() // <- !!!!!!
1694
1694
*/
1695
1695
jsPDF . API = { events :[ ] } ;
1696
- jsPDF . version = "1.0.118 -debug 2014-04-28T19:38 :diegocr" ;
1696
+ jsPDF . version = "1.0.119 -debug 2014-04-29T03:48 :diegocr" ;
1697
1697
1698
1698
if ( typeof define === 'function' ) {
1699
1699
define ( function ( ) {
@@ -1703,7 +1703,7 @@ var jsPDF = (function(global) {
1703
1703
global . jsPDF = jsPDF ;
1704
1704
}
1705
1705
return jsPDF ;
1706
- } ( self ) ) ;
1706
+ } ( typeof self !== "undefined" && self || typeof window !== "undefined" && window || this ) ) ;
1707
1707
/**
1708
1708
* jsPDF addHTML PlugIn
1709
1709
* Copyright (c) 2014 Diego Casorran
@@ -7552,7 +7552,7 @@ var Deflater = (function(obj) {
7552
7552
*/
7553
7553
7554
7554
7555
- ( function ( ) {
7555
+ ( function ( global ) {
7556
7556
var PNG ;
7557
7557
7558
7558
PNG = ( function ( ) {
@@ -7895,9 +7895,12 @@ var Deflater = (function(obj) {
7895
7895
return ret ;
7896
7896
} ;
7897
7897
7898
- scratchCanvas = document . createElement ( 'canvas' ) ;
7899
-
7900
- scratchCtx = scratchCanvas . getContext ( '2d' ) ;
7898
+ try {
7899
+ scratchCanvas = global . document . createElement ( 'canvas' ) ;
7900
+ scratchCtx = scratchCanvas . getContext ( '2d' ) ;
7901
+ } catch ( e ) {
7902
+ return - 1 ;
7903
+ }
7901
7904
7902
7905
makeImage = function ( imageData ) {
7903
7906
var img ;
@@ -7991,9 +7994,9 @@ var Deflater = (function(obj) {
7991
7994
7992
7995
} ) ( ) ;
7993
7996
7994
- window . PNG = PNG ;
7997
+ global . PNG = PNG ;
7995
7998
7996
- } ) . call ( this ) ;
7999
+ } ) ( typeof window !== "undefined" && window || this ) ;
7997
8000
/*
7998
8001
* Extracted from pdf.js
7999
8002
* https://github.com/andreasgal/pdf.js
@@ -8118,6 +8121,9 @@ var DecodeStream = (function() {
8118
8121
} ) ( ) ;
8119
8122
8120
8123
var FlateStream = ( function ( ) {
8124
+ if ( typeof Uint32Array === 'undefined' ) {
8125
+ return undefined ;
8126
+ }
8121
8127
var codeLenCodeMap = new Uint32Array ( [
8122
8128
16 , 17 , 18 , 0 , 8 , 7 , 9 , 6 , 10 , 5 , 11 , 4 , 12 , 3 , 13 , 2 , 14 , 1 , 15
8123
8129
] ) ;
@@ -8645,4 +8651,4 @@ var FlateStream = (function() {
8645
8651
} ;
8646
8652
}
8647
8653
8648
- } ) ( this ) ;
8654
+ } ) ( typeof self !== "undefined" && self || typeof window !== "undefined" && window || this ) ;
0 commit comments