Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 08-11-2015, 03:37 AM   #1
ni_c
Enthusiast
ni_c began at the beginning.
 
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
ni_c is offline   Reply With Quote
Old 08-11-2015, 06:21 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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>
Change the 4 above to whatever you need.
kovidgoyal is offline   Reply With Quote
Advert
Old 08-11-2015, 11:38 AM   #3
ni_c
Enthusiast
ni_c began at the beginning.
 
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)
ni_c is offline   Reply With Quote
Old 08-11-2015, 12:16 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 08-11-2015, 01:07 PM   #5
ni_c
Enthusiast
ni_c began at the beginning.
 
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>
and noworries about the roman numerals, youve been a great help already

Last edited by ni_c; 08-11-2015 at 01:13 PM.
ni_c is offline   Reply With Quote
Advert
Reply


Forum Jump

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


All times are GMT -4. The time now is 09:54 PM.


MobileRead.com is a privately owned, operated and funded community.