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 03-22-2014, 09:40 PM   #1
kerliza
Member
kerliza began at the beginning.
 
kerliza's Avatar
 
Posts: 24
Karma: 10
Join Date: Oct 2013
Device: none
epub to pdf pagination

I want to specify the starting page number for epub-->pdf conversion. Using the footnote template of PDF Output in conversion settings of Calibre I need to modify the code:

<p style="text-align:center;">_PAGENUM_</p>

to start at a number I choose. Please help me with the code needed to generate pagination under my control.

Thanks!
kerliza is offline   Reply With Quote
Old 03-22-2014, 09:59 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by kerliza View Post
I want to specify the starting page number for epub-->pdf conversion. Using the footnote template of PDF Output in conversion settings of Calibre I need to modify the code:

<p style="text-align:center;">_PAGENUM_</p>

to start at a number I choose. Please help me with the code needed to generate pagination under my control.

Thanks!
Simple:
You don't/can't with Calibre
e-books are reflowable, there are no pages, so no need for page numbering.

You might be able to export as RTF (to keep styles) and use that with a Word Processing program to paginate and PRINT to PDF
theducks is offline   Reply With Quote
Advert
Old 03-22-2014, 11:54 PM   #3
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,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use something like

<p id="pagenum" style="text-align:center;"></p><script>document.getElementById("pagenum").inner HTML = "" + (_PAGENUM_ + 3)</script>

Replace 3 above with whatever you need.
kovidgoyal is offline   Reply With Quote
Old 03-23-2014, 12:03 AM   #4
kerliza
Member
kerliza began at the beginning.
 
kerliza's Avatar
 
Posts: 24
Karma: 10
Join Date: Oct 2013
Device: none
Quote:
Originally Posted by theducks View Post
Simple:
You don't/can't with Calibre
e-books are reflowable, there are no pages, so no need for page numbering.

You might be able to export as RTF (to keep styles) and use that with a Word Processing program to paginate and PRINT to PDF
Thank you, and I am very aware of the epub's best feature of reflowable text and the rationale for epub variations to suit the reader pref's. In no way do I wish to paginate my epub. Rather, I am converting my epub into pdf for hard copy print and in the Calibre setup for PDF Output settings tab there is a header/footer template allowing for user code input, with an option for page numbering of a pdf with a sample instruction given at the link below.

http://manual.calibre-ebook.com/conv...verting-to-pdf

Using their template for input isn't there a way to direct the code to begin at a specific number instead of at numeral 1? Due to high image content the files are too big to manage as a whole on my limited computer. I have to paginate chapters separately for now; rejoining later into a composite project that needs an index.

I am ignorant of code in this instance and after three+ days searching online for a model in Calibre I hoped someone in the forum has some experience with the template Calibre offers for footers.

For instance, the code Calibre offers paginates epub Chapter One beautifully in pdf output because the first page is page one. I can't paginate for the successive chapters. For example, Chapter Two needs to begin as page 19.

Wow, it stumps me there is no code for this.

kerliza
kerliza is offline   Reply With Quote
Old 03-23-2014, 12:21 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by kerliza View Post
Wow, it stumps me there is no code for this.
You may have missed post 3 that has your solution.
DoctorOhh is offline   Reply With Quote
Advert
Old 03-23-2014, 01:36 AM   #6
kerliza
Member
kerliza began at the beginning.
 
kerliza's Avatar
 
Posts: 24
Karma: 10
Join Date: Oct 2013
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Use something like

<p id="pagenum" style="text-align:center;"></p><script>document.getElementById("pagenum").inner HTML = "" + (_PAGENUM_ + 3)</script>

Replace 3 above with whatever you need.
Thank you for the code sample. I did not have success with it. No digits or text appear in the result.
kerliza is offline   Reply With Quote
Old 03-23-2014, 02:09 AM   #7
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,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You will need to wait for the next calibre release which will enable using javascript inside header/footer templates.
kovidgoyal is offline   Reply With Quote
Old 03-23-2014, 02:18 AM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
The change is here: https://github.com/kovidgoyal/calibr...10ef92678b02be
eschwartz is offline   Reply With Quote
Old 03-23-2014, 02:26 AM   #9
kerliza
Member
kerliza began at the beginning.
 
kerliza's Avatar
 
Posts: 24
Karma: 10
Join Date: Oct 2013
Device: none
Okay, thanks for your help. I think calibre is about the best I've found in bridging formats coherently.
kerliza is offline   Reply With Quote
Reply

Tags
calibre, conversion, epub-->pdf, pagination


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert from epub to pdf and maintain original pagination format? zenorb Conversion 16 03-03-2013 12:46 PM
Converting epub into pdf with print pagination luciano Workshop 6 09-05-2012 05:15 PM
Keeping Pagination in ePub azores ePub 5 03-28-2012 12:17 PM
EPub pagination ccowie Calibre 11 02-09-2011 10:59 PM


All times are GMT -4. The time now is 08:02 AM.


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