Adding options to set header and footer in PDF generation

This commit is contained in:
Alexandre Aquiles
2014-10-06 13:17:34 -03:00
parent df1a82e0e4
commit a56b559d43
3 changed files with 17 additions and 3 deletions
+7 -1
View File
@@ -118,7 +118,13 @@ Here are the options that can be stored in this file:
"left": 62,
"top": 36,
"bottom": 36
}
},
//Header HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
"headerTemplate": null,
//Footer HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
"footerTemplate": null
}
}
```
+7 -1
View File
@@ -83,7 +83,13 @@ var CONFIG = {
"left": 62,
"top": 36,
"bottom": 36
}
},
//Header HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
"headerTemplate": null,
//Footer HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
"footerTemplate": null
}
};
+3 -1
View File
@@ -55,7 +55,9 @@ Generator.prototype.finish = function() {
"--pdf-default-font-size": String(pdfOptions.fontSize),
"--pdf-mono-font-size": String(pdfOptions.fontSize),
"--paper-size": String(pdfOptions.paperSize),
"--pdf-page-numbers": Boolean(pdfOptions.pageNumbers)
"--pdf-page-numbers": Boolean(pdfOptions.pageNumbers),
"--pdf-header-template": pdfOptions.headerTemplate,
"--pdf-footer-template": pdfOptions.footerTemplate
});
}