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 07-31-2015, 12:08 PM   #1
xanguera
Member
xanguera began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2014
Device: ipad3
ebook-convert (docx->html) inserting too many page breaks

Hi,
I am converting a docx document to html with the command line tool (calibre version 2.31.0). In my docx document I have both page breaks as well as section breaks (that continue in the next page).
When performing the conversion I find that a new page is created for both cases, when I would expect for it only to happen at the page breaks.
Is this the expected behavior? if so, do I have anyway around it? I really need to have these section breaks.

thanks.
xanguera is offline   Reply With Quote
Old 07-31-2015, 03:58 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: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Anything that renders as a page break in print mode in the docx will become a page break in the output file. If you're saying that you're seeing something different, then attach a sample docx file showing the problem.
kovidgoyal is offline   Reply With Quote
Advert
Old 07-31-2015, 04:23 PM   #3
xanguera
Member
xanguera began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2014
Device: ipad3
Exactly, I am seeing this behaviour, but I would not have expected to have a page break when inserting a section break.
Anyway, if I understand it correctly you are not considering the docx XML tags but (somehow) the rendered output, right? if so, I will definitely have to look for another workaround as section breaks are rendered exactly as page breaks, they are just treated with another XML tag and have some other properties.

Out of curiosity, is calibre using its own rendering engine? getting the right pagination is one of the things that keep me awake at night and being able to access this step would be wonderful.

Thanks.
xanguera is offline   Reply With Quote
Old 07-31-2015, 08:05 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: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No calibre uses the XML, but it converts the XML in the same way as word would render it, as far as possible. Since word renders <sectPr> with a page break, the docx plugin does the same thing, anything else would be very surprising to most users. If you dont want that behavior your best bet is to run from source and comment out line 410 in docx/styles.py
kovidgoyal is offline   Reply With Quote
Reply

Tags
ebook-convert, page break


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert HTML to RTF with Page Breaks odusto Conversion 11 03-18-2013 05:04 PM
page breaks in html document michaelsmith1983 Conversion 1 03-06-2012 10:32 PM
Inserting a blank page in Kindle ebook. Patuba General Discussions 4 07-15-2011 02:22 PM
inserting a "ruled Line" /chapter and page breaks tscamera Calibre 3 01-05-2011 04:47 PM
Kindle inserting page breaks? december Calibre 8 07-15-2010 09:47 AM


All times are GMT -4. The time now is 11:10 PM.


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