View Single Post
Old 03-01-2015, 10:52 PM   #12
EbokJunkie
Addict
EbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blue
 
Posts: 230
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
@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?

Last edited by EbokJunkie; 03-01-2015 at 11:00 PM.
EbokJunkie is offline   Reply With Quote