Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-10-2012, 05:29 PM   #1
jbuckh
Junior Member
jbuckh began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: none
HTML to PDF, printing page numbers

Just started using Calibre and it has been great so far. Sorry if this question has been answered elsewhere, I can't figure it out for the life of me.

I'm compiling a large HTML file then using Calibre via command line to convert it to a PDF. In order to publish it, I need the PDF to include page numbers on each page but they aren't showing. I've looked everywhere but I can't figure out how to get the page numbers to show.

Any thoughts? Below I've included the command I'm using to run Calibre.

Code:
xvfb-run ebook-convert public_html/pm4id.html public_html/pm4id.pdf --output-profile=default --smarten-punctuation --cover=public_html/Images/cover.jpg --margin-left=72 --margin-right=72 --margin-top=72 --margin-bottom=72 --pretty-print --level1-toc=//h:h1 --level2-toc=//h:h2
jbuckh is offline   Reply With Quote
Old 12-10-2012, 11:32 PM   #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
calibre's PDF Output engine currently has no support for generating page numbers.

Last edited by kovidgoyal; 12-10-2012 at 11:43 PM.
kovidgoyal is offline   Reply With Quote
Old 12-11-2012, 01:59 PM   #3
jbuckh
Junior Member
jbuckh began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: none
Dang, well thanks for getting back to me. Calibre is a great program.
jbuckh is offline   Reply With Quote
Old 12-12-2012, 02:33 PM   #4
jbuckh
Junior Member
jbuckh began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: none
I wanted to write my solution here in case anyone else needs it.

I send my pdf which was created by Calibre through pdflatex to create page numbers. Below I copied my .tex file that is being sent to pdflatex. pdf.pdf is the name of the Calibre generated pdf.

Quote:
\documentclass[8pt]{article}
\usepackage[final]{pdfpages}
\usepackage{fancyhdr}

\topmargin 70pt
\oddsidemargin 70pt

\pagestyle{fancy}
\rfoot{}
\cfoot{\Large\thepage}
\renewcommand {\headrulewidth}{0pt}
\renewcommand {\footrulewidth}{0pt}

\begin{document}
\includepdfset{page=1,pagecommand=\thispagestyle{e mpty}}
\includepdf{pdf.pdf}
\includepdfset{pages=2-,pagecommand=\thispagestyle{fancy}}
\includepdf{pdf.pdf}
\end{document}
This tex file will place a page number on the center of each page. It will also ignore the first page (mine is a cover image that does not need a page number).

The command I used is here:
Quote:
pdflatex -output-directory=directory {tex file name}
jbuckh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing TOC page numbers in MobiPocket Creator HTML Editor pstjmack Kindle Formats 0 10-29-2012 09:19 AM
page numbers in pdf jacktanner Calibre 2 10-08-2011 08:11 PM
larger top page margin when printing to pdf? whbenson Sigil 0 05-15-2010 12:38 AM
DX, PDF, and Page Numbers tklaus Amazon Kindle 1 06-28-2009 08:20 PM
pdf and page numbers pimpoum Sony Reader 2 04-21-2009 12:52 PM


All times are GMT -4. The time now is 08:34 PM.


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