![]() |
#1 |
Member
![]() Posts: 24
Karma: 10
Join Date: Oct 2013
Device: none
|
epub--> pdf: odd-even pagenum
Hello!
I am using the footer template to convert epbu--> to pdf and would like to have pagenum odd and even. I've tried several code inputs over the past few days with no results. My results always end up with text-align right or left but not alternating for odd/even. For example: <p style="text-align:LEFT"><span class="even_page">_PAGENUM_</span><span class="odd_page" STYLE="TEXT-ALIGN: RIGHT;">_PAGENUM_</span></p> gives me all page numbers on the left. Has anyone a footer code to share that places odd page number right side and even page number left side in footer? Maybe I have to use <div></div> wrap and generate css in Look and Feel? I haven't used the dialog yet other than examples placed in toc sampler code of Calibre manual. Also, how to exclude page numbering for some pages, e.g. for table of contents epub file when converting to pdf. Help is appreciated! |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,240
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Code:
<p id="pagenum" style="text-align:left">_PAGENUM_</p><script>if (_PAGENUM_ % 2 == 0) document.getElementById("pagenum").style.textAlign = "right";</script> |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 24
Karma: 10
Join Date: Oct 2013
Device: none
|
Thank you very much! Works Great!
|
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 24
Karma: 10
Join Date: Oct 2013
Device: none
|
even page# left /odd page# right
I am not getting the results on subsequent chapters and have come back to the drawing board . . . still need some help, please.
OK, so the code for paginating epub to pdf footer even# pages to the left side and odd# pages to the right side (for publication layout): <p id="pagenum" style="text-align:left">_PAGENUM_</p><script>if (_PAGENUM_ % 2 == 0) document.getElementById("pagenum").style.textAlign = "right";</script> How do I get the footer template to recognize the intent of the script below? I have separate chapters to join later and must set a start page other than #1 for each chapter. <p id="pagenum" style="text-align:left;"></p><script>document.getElementById("pagenum").inner HTML = "" + (_PAGENUM_ + 3)</script> |
![]() |
![]() |
![]() |
Tags |
epub-->pdf, odd/even pagenum |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura HD Odd PDF performance | ottdmk | Kobo Reader | 4 | 02-07-2014 06:04 AM |
Touch Odd error in PDF display | ottdmk | Kobo Reader | 10 | 07-22-2013 02:26 AM |
PDF with odd text/font | Atagahi | Sony Reader | 0 | 04-28-2011 11:03 AM |
odd epub image problem | bobcdy | Sigil | 15 | 03-02-2011 09:27 AM |
Odd problem when converting PDF to EPUB | pops1959 | Calibre | 9 | 01-06-2011 08:19 AM |