File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,11 @@ var ReactToPdf = function (_PureComponent) {
5555 if ( ! targetComponent ) {
5656 throw new Error ( 'Target ref must be used or informed. See https://github.com/ivmarcos/react-to-pdf#usage.' ) ;
5757 }
58- ( 0 , _html2canvas2 . default ) ( targetComponent , { logging : false } ) . then ( function ( canvas ) {
58+ ( 0 , _html2canvas2 . default ) ( targetComponent , {
59+ logging : false ,
60+ useCORS : true ,
61+ scale : this . props . scale
62+ } ) . then ( function ( canvas ) {
5963 var imgData = canvas . toDataURL ( 'image/png' ) ;
6064 var pdf = new _jspdf2 . default ( options ) ;
6165 pdf . addImage ( imgData , 'JPEG' , x , y ) ;
@@ -79,6 +83,7 @@ ReactToPdf.defaultProps = {
7983 filename : 'download.pdf' ,
8084 x : 0 ,
8185 y : 0 ,
86+ scale : 1 ,
8287 onComplete : undefined ,
8388 targetRef : undefined
8489} ;
You can’t perform that action at this time.
0 commit comments