...The library tries to find any element, that contains the page header or pageFooter id prefix. The full options object gets converted to JSON and will get passed to the phantomjs script as third argument. There are more options concerning the paperSize, header & footer options inside the phantomjs script.