Skip to content

Commit f049576

Browse files
committed
Merge branch 'alexandreaquiles-pdf_header_and_footer'
2 parents 1da3417 + a7ecbb8 commit f049576

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,13 @@ Here are the options that can be stored in this file:
118118
"left": 62,
119119
"top": 36,
120120
"bottom": 36
121-
}
121+
},
122+
123+
//Header HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
124+
"headerTemplate": null,
125+
126+
//Footer HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
127+
"footerTemplate": null
122128
}
123129
}
124130
```

lib/generate/config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,13 @@ var CONFIG = {
8383
"left": 62,
8484
"top": 36,
8585
"bottom": 36
86-
}
86+
},
87+
88+
//Header HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
89+
"headerTemplate": null,
90+
91+
//Footer HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
92+
"footerTemplate": null
8793
}
8894
};
8995

lib/generate/ebook/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Generator.prototype.finish = function() {
5858
"--pdf-mono-font-size": String(pdfOptions.fontSize),
5959
"--paper-size": String(pdfOptions.paperSize),
6060
"--pdf-page-numbers": Boolean(pdfOptions.pageNumbers),
61+
"--pdf-header-template": String(pdfOptions.headerTemplate),
62+
"--pdf-footer-template": String(pdfOptions.footerTemplate)
6163
});
6264
}
6365

0 commit comments

Comments
 (0)