Skip to content

Commit

Permalink
Feat(PDF): Add additional file margins
Browse files Browse the repository at this point in the history
  • Loading branch information
daruwanov committed Mar 14, 2016
1 parent 656b8dc commit 3d4b34d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-export-button",
"description": "Angular Export Button - AngularJS directive for creating reports in csv and pdf",
"version": "0.0.6",
"version": "0.0.7",
"keywords": [
"angular",
"csv",
Expand Down
14 changes: 7 additions & 7 deletions dist/export-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
scope.getSCVArray = function () {
var data = [];
angular.forEach(scope.resources, function (resource) {
var tmp = {}
var tmp = {};
angular.forEach(scope.fields, function (field) {
tmp[field] = resource[field];
});
Expand All @@ -38,15 +38,15 @@
var data = [];
data.push(scope.headers);
angular.forEach(scope.resources, function (resource) {
var tmp = []
var tmp = [];
angular.forEach(scope.fields, function (field) {
tmp.push(resource[field]);
});
data.push(tmp);
});


var pdf = {
return {
content: [
{
table: {
Expand All @@ -56,10 +56,9 @@
}
}
],
pageOrientation: scope.pageOrientation
pageOrientation: scope.pageOrientation,
pageMargins: scope.pageMargins
};

return pdf;
};

//function that download pdf file
Expand Down Expand Up @@ -88,7 +87,8 @@
resources: '=resources',
fields: '=fields',
headers: '=headers',
pageOrientation: '=pageOrientation'
pageOrientation: '=pageOrientation',
pageMargins: '=pageMargins'
},
link: linker,
transclude: true,
Expand Down

0 comments on commit 3d4b34d

Please sign in to comment.