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 11-18-2014, 11:19 AM   #1
MrBen
Random Member
MrBen began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2014
Location: London
Device: Nook
Exclamation html to pdf, TOC Page# trouble from CSS...

We are using //h:h1 etc for level 1 TOC.

When we have a style that includes a negative left or right margin on the h1,
e.g.
margin-left: -1em;

then the page numbering on the TOC goes wrong.

The obvious workaround is to not use negative values for margin-left and margin-right, especially with TOC-level elements.

I have included a zip file that demonstrates the behaviour.
Line 270 of the style.css file switches the behaviour on and off.

We would love to have the ability to resolve this, but we know no python - we are merely humble users (and fans) of Calibre.
Attached Files
File Type: zip example.zip (87.7 KB, 162 views)
MrBen is offline   Reply With Quote
Old 11-18-2014, 11:30 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,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Your zip file is missing style.css
kovidgoyal is offline   Reply With Quote
Old 11-18-2014, 12:33 PM   #3
MrBen
Random Member
MrBen began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2014
Location: London
Device: Nook
missing style..

so sorry!!
Attached Files
File Type: zip style.css.zip (3.5 KB, 156 views)
MrBen is offline   Reply With Quote
Old 11-18-2014, 10:19 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,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I tried running convert.sh on my system with calibre 2.10 and I saw nothing wrong in the output PDF file, see attached.
Attached Files
File Type: pdf proposal.pdf (83.1 KB, 184 views)
kovidgoyal is offline   Reply With Quote
Old 11-19-2014, 07:08 AM   #5
MrBen
Random Member
MrBen began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2014
Location: London
Device: Nook
That is interesting. We are using calibre 2.10 also - but on mac os x / Yosemite.
Note in the pdf (sent in the first zip bundle) the page numbers for The Project A, The Project B, and Post launch services are 8,2,3 respectively rather than 1,2,3.

Also, the pdf you attach looks very different indeed - I'm wondering if we are doing something wrong, or is it that different os will produce different results?

BTW, thanks for your near instant support.
MrBen is offline   Reply With Quote
Old 11-19-2014, 07:29 AM   #6
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,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The biggest difference in PDF output comes from fonts. Make sure your style file specifies proper font-families that are available on your system.
kovidgoyal is offline   Reply With Quote
Reply

Tags
bug, css, pdf-output, toc pages


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibre EPUB->PDF: page numbers in printed TOC? dancal Conversion 13 06-13-2013 08:32 PM
HTML to PDF, printing page numbers jbuckh Calibre 3 12-12-2012 02:33 PM
Removing TOC page numbers in MobiPocket Creator HTML Editor pstjmack Kindle Formats 0 10-29-2012 09:19 AM
Converting to PDF help? Bad page breaks and no TOC produced. Jokerfwb Conversion 6 07-24-2012 10:36 PM
PDF to HTML page break questions michaelbr PDF 3 01-27-2011 08:49 PM


All times are GMT -4. The time now is 05:27 AM.


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