@kovidgoyal
Looks as JavaScript is disabled in command line.
This header template:
Code:
<div id="header" style="font-size:x-small"><p style="float:left">_TITLE_</p><p style="float:right;"><i>_AUTHOR_</i></p></div><script>document.getElementById("header").style.display = "none";</script>
being used in Calbre GUI Pdf output allows to toggle header on and off at all pages using either "inline" or "none".
Exact copy of the same template used in CLI --pdf-header-template option doesn't eliminate header if style.display="none".
Same about this template from Calibre website:
Code:
<p id="pagenum" style="text-align:center;"></p><script>document.getElementById("pagenum").innerHTML = "" + (_PAGENUM_ + 3)</script>
CLI throws an error until all blanks are eliminated; even after this command does nothing.
Same template (with all blanks, exact copy from the web page) works perfectly in GUI.
Is there any way to enable JavaScript in command line?