01-18-2015, 05:05 PM | #1 |
Member
Posts: 11
Karma: 10
Join Date: Jan 2015
Device: none
|
Why are my page numbers cut off?
Hello. I searched the forums, Google and Calibre documentation and could not find anything about this. I am new to Calibre so any help troubleshooting this would be appreciated.
I am converting an EPUB to PDF. Everything comes out great, except the page numbers added by Calibre are cut off at the bottom of each page. Aside from changing the font size in the "PDF Output" options, I didn't touch anything in Calibre. Here is my conversion log. I can not provide the original EPUB file for copyright reasons. How can I go about troubleshooting this problem? |
01-18-2015, 05:12 PM | #2 |
Member
Posts: 11
Karma: 10
Join Date: Jan 2015
Device: none
|
On line 181 of my conversion log it says:
Code:
Bottom margin is too small for footer, increasing it to 9.0pts edit: This was the problem. I went to "Page Setup" in Calibre and changed the bottom margin to 24 pt. and it fixed the problem. Last edited by Books987; 01-18-2015 at 05:33 PM. |
01-22-2015, 01:11 AM | #3 |
Addict
Posts: 229
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
|
@Books987
Use Calibre 2.16 or later and put this as header template: Code:
<div style="font-size:x-small;"><span class="even_page"> <p style="overflow:hidden;white-space:nowrap;max-width:40mm;text-overflow:ellipsis;float:left;margin-top:0px;margin-bottom:0px;padding-top:0px;padding-bottom:0px;">_AUTHOR_</p><p style="overflow:hidden;white-space:nowrap;max-width:40mm;text-overflow:ellipsis;float:right;margin-top:0px;margin-bottom:0px;padding-top:0px;padding-bottom:0px;">_TITLE_</p></div><div style="font-size:x-small;"><span class="odd_page"><p style="overflow:hidden;white-space:nowrap;max-width:70mm;text-overflow:ellipsis;float:left;margin-top:0px;margin-bottom:0px;padding-top:0px;padding-bottom:0px;">_SECTION_</p><p style="float:right;margin-top:0px;margin-bottom:0px;padding-top:0px;padding-bottom:0px;">_PAGENUM_</p></div><hr noshade width="100%" size=1> |
01-24-2015, 11:04 PM | #4 |
Member
Posts: 11
Karma: 10
Join Date: Jan 2015
Device: none
|
Thank you, good to know.
Another question: If I want to use Calibre's "add page numbers to every page" option, is there a way to except certain pages? I don't want the first ten pages of the book to have any page numbers, for example. And there are a few pages later that don't need numbering. Any ideas? |
01-24-2015, 11:46 PM | #5 |
Addict
Posts: 229
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
|
No way to do this in Calibre. However, you can use PDFill Editor to add customized footers
post factum. |
01-24-2015, 11:53 PM | #6 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Sure you can, you can insert arbitrary javascript expressions into the header/footer templates. There is an example of that in the manual http://manual.calibre-ebook.com/conv...verting-to-pdf
You simply use an if expression ot have the javascript suppress the pagenumber on pages you dont want it. |
01-24-2015, 11:57 PM | #7 | |
Member
Posts: 11
Karma: 10
Join Date: Jan 2015
Device: none
|
Quote:
|
|
01-25-2015, 12:21 AM | #8 |
Addict
Posts: 229
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
|
Wow, I forgot about javascript...
Kovid, can we use javascript to set font size of page numbers in points? |
01-25-2015, 12:59 AM | #9 | |
Member
Posts: 11
Karma: 10
Join Date: Jan 2015
Device: none
|
Quote:
Anyone want to tell me how to omit the page numbers until the page number reaches 11? edit: Ok, I see now you just told me to use an if statement. Pretty easy - I just need to figure out the syntax. Thanks Kovi. |
|
01-25-2015, 01:05 AM | #10 |
Member
Posts: 11
Karma: 10
Join Date: Jan 2015
Device: none
|
Oh yeah, first try, baby!
<script>if(_PAGENUM_>10){document.getElementById(" pagenum").innerHTML = "" + (_PAGENUM_);}</script> edit: The above code inserts no page numbers until page 11. I also wanted to omit page numbers on two other pages later, so I did it like this: <p id="pagenum" style="text-align:center;"></p><script>if(_PAGENUM_>10 && _PAGENUM_!=15 && _PAGENUM_!=81){document.getElementById("pagenum"). innerHTML = "" + (_PAGENUM_);}</script> Last edited by Books987; 01-25-2015 at 01:10 AM. |
01-25-2015, 01:48 AM | #11 |
Addict
Posts: 229
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
|
No need for javascript for font size, just font-size style works. However, empty space in footer is still too large, at least one line gets cut from the text.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Chapter Page Numbers Instead of Title Page Numbers | TheArtfulDodger | Devices | 1 | 11-18-2013 01:08 PM |
Kindle (AZW3/MOBI) ebooks with "real page numbers" to PDF with same page numbers? | abvgd | Conversion | 2 | 05-24-2013 01:24 PM |
PRS-T1 Can you make page-numbers correspond to page-turns? | bibahbuzemann | Sony Reader | 13 | 01-01-2012 12:03 AM |
Is there a hack for displaying page numbers rather than location numbers? | nesler | Kindle Developer's Corner | 16 | 02-15-2011 12:00 AM |
Podcast numbers cut through hype | Laurens | Lounge | 1 | 04-11-2006 09:40 PM |