View Single Post
Old 05-03-2023, 11:39 AM   #4
berchas
Junior Member
berchas began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2023
Device: none
I applied the following (and variants of it):

ebook-convert in.epub out.pdf --pdf-header-template '<header><div id="pagenum"></div><script>if (_PAGENUM_ > 5) document.getElementById("pagenum").innerHTML = "" + _PAGENUM_</script></header>'

The if condition seems to cause the mentioned errors.

The code given in the documentation works fine, e.g.:
'<header><div></div><script>document.currentScript.parentNode.quer ySelector("div").innerHTML = "" + (_PAGENUM_ + 3)</script> </header'

However, it only shifts page numbers. I want to remove them from the first pages.
berchas is offline   Reply With Quote