Skip to content

Commit

Permalink
Change default margin to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
eKoopmans committed May 24, 2017
1 parent 2c0b345 commit 311155a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The `opt` parameter has the following optional fields:

|Name |Type |Default |Description |
|------------|----------------|------------------------------|---------------------------------------------------------------------------------------------|
|margin |number or array |1 |PDF margin. Array can be either [vMargin, hMargin] or [top, left, bottom, right]. |
|margin |number or array |0 |PDF margin. Array can be either [vMargin, hMargin] or [top, left, bottom, right]. |
|filename |string |'file.pdf' |The default filename of the exported PDF. |
|image |object |{type: 'jpeg', quality: 0.95} |The image type and quality used to generate the PDF. See the Extra Features section below. |
|enableLinks |boolean |true |If enabled, PDF hyperlinks are automatically added ontop of all anchor tags. |
Expand Down
2 changes: 1 addition & 1 deletion src/html2pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ var html2pdf = (function(html2canvas, jsPDF) {
// Parse the margin property of the opt object.
switch (objType(opt.margin)) {
case 'undefined':
opt.margin = 1;
opt.margin = 0;
case 'number':
opt.margin = [opt.margin, opt.margin, opt.margin, opt.margin];
break;
Expand Down

0 comments on commit 311155a

Please sign in to comment.