08-11-2015, 03:37 AM | #1 |
Enthusiast
Posts: 40
Karma: 10
Join Date: Jul 2015
Device: none
|
Pdf page number delay and roman numerals
Hey, posted this yesterday but not in this subforum,
just wanto add page number delays to pdf header/footers with the first few blank or roman numerals instead, like most most books use only one suggestion for code roughly similar here at least suggests it should be do-able |
08-11-2015, 06:21 AM | #2 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Code:
<p id="pagenum" style="text-align:center;"></p><script>document.getElementById("pagenum").innerHTML = (_PAGENUM_ > 4) ? ("" + _PAGENUM_) : ""</script> |
Advert | |
|
08-11-2015, 11:38 AM | #3 |
Enthusiast
Posts: 40
Karma: 10
Join Date: Jul 2015
Device: none
|
thanks kovidgoyal,
however that snippet only stops it printing numbers on the first few pages, and starts them up with the physical page number after them, instead of beginning with 1 which is what id like to do also is there no simple way to add roman numerals for innitial pages? (like i,ii,iii,1) |
08-11-2015, 12:16 PM | #4 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Add -3
<p id="pagenum" style="text-align:center;"></p><script>document.getElementById("pagenum").inner HTML = (_PAGENUM_ > 4) ? ("" + (_PAGENUM_ - 3)) : ""</script> As for roman numerals, yeah it can be done, but I dont have the time to write the code for you, sorry. |
08-11-2015, 01:07 PM | #5 |
Enthusiast
Posts: 40
Karma: 10
Join Date: Jul 2015
Device: none
|
that works, thanks again
btw just needed to remove a space between .inner HTML for it to work, and looks like the two numerical values need to be the same for the first printed number to be 1, eg the following makes page 4 show as 1 Code:
<p id="pagenum" style="text-align:center;"></p><script>document.getElementById("pagenum").innerHTML = (_PAGENUM_ > 3) ? ("" + (_PAGENUM_ - 3)) : ""</script> Last edited by ni_c; 08-11-2015 at 01:13 PM. |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
regex-function convert roman numerals | weberr | Editor | 11 | 09-22-2021 05:15 PM |
Book detail area: series number given in Roman numerals | BeccaPrice | Calibre | 19 | 09-08-2015 11:42 PM |
Roman Numerals for series and on book jacket | Arbait | Library Management | 31 | 05-17-2015 01:16 AM |
Convert Roman numerals to Arabic? | Peter W | Sigil | 2 | 04-09-2012 11:55 AM |
regex search for roman numerals | Blurr | Calibre | 2 | 12-16-2009 05:55 PM |