GitbookIO/gitbook — pull request #456 by alexandreaquiles (2014-10-06 16:25:38+00:00)
Title: Adding options to set header and footer in PDF generation

If the user wants to add a header or footer in each page of a generated PDF, he will be able to configure `book.json` like the following:
```
"pdf": {
"pageNumbers": true,
"paperSize": "a5",
"headerTemplate": "

My Book_SECTION_

",
"footerTemplate": "

_PAGENUM_

"
}
```

The `ebook-convert` call will have the `--pdf-header-template` and `--pdf-footer-template` arguments if needed.

The user will be able to use Calibre's variables: `_PAGENUM_`, `_TITLE_`, `_AUTHOR_` and `_SECTION_`.