Skip to content

Commit 311155a

Browse files
committed
Change default margin to 0
1 parent 2c0b345 commit 311155a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The `opt` parameter has the following optional fields:
4444

4545
|Name |Type |Default |Description |
4646
|------------|----------------|------------------------------|---------------------------------------------------------------------------------------------|
47-
|margin |number or array |1 |PDF margin. Array can be either [vMargin, hMargin] or [top, left, bottom, right]. |
47+
|margin |number or array |0 |PDF margin. Array can be either [vMargin, hMargin] or [top, left, bottom, right]. |
4848
|filename |string |'file.pdf' |The default filename of the exported PDF. |
4949
|image |object |{type: 'jpeg', quality: 0.95} |The image type and quality used to generate the PDF. See the Extra Features section below. |
5050
|enableLinks |boolean |true |If enabled, PDF hyperlinks are automatically added ontop of all anchor tags. |

src/html2pdf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ var html2pdf = (function(html2canvas, jsPDF) {
106106
// Parse the margin property of the opt object.
107107
switch (objType(opt.margin)) {
108108
case 'undefined':
109-
opt.margin = 1;
109+
opt.margin = 0;
110110
case 'number':
111111
opt.margin = [opt.margin, opt.margin, opt.margin, opt.margin];
112112
break;

0 commit comments

Comments
 (0)