![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
|
Horizontal lines in DOCX to EPUB conversion.
I am SERIOUSLY impressed with the new DOCX conversion feature in Calibre (0.9.36). Many thanks!
A minor omission appears to be the handling of horizontal lines. These generate a paragraph with a consistent, unique style, but the actual <hr> tag is not inserted. Currently, I can easily correct this using Sigil. However it may be simple to implement/correct. Thanks again. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,200
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You're welcome, attach a sample docx file with the horizontal lines and I'll see if it can be done. IIRC, horizontal lines in DOCX are not a simple thing, but I may be mis-remembering.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
|
Hi Kovid
As requested here's a sample of horizontal lines in DOCX + EPUB formats. The files are zipped because the forum interface allows .DOC but not .DOCX I cut the initial text from the MS Word Help system and added some examples as described there. The different lines convert to block8 - block13 style paragraphs which are consistent for repeated lines of the same type. I've not worked out how to look inside the word document. Cheers Steve |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,200
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm somewhat confused, the docx and epub files you attached appear to have the same number of horizontal lines. The styles are a little different, but that's because some line styles are not available in HTML.
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
|
Yes the EPUB is as generated by Calibre (0.9.37).
This example doesn't have repeated lines of the same style. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,200
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
So what is the bug? The EPUB and the docx look the same? I need an example docx that demonstrates a bug on conversion.
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
|
The problem is that there is no <hr> tag in the EPUB output and therefore no line across the page.
Steve |
![]() |
![]() |
![]() |
#8 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,635
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Unzip it - courtesy of KG who told me that a couple of weeks ago.
This what the two files look like here, the first single line seems to absent BR Last edited by BetterRed; 06-28-2013 at 10:41 AM. |
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
|
Sorry I've just looked at my example again more carefully:
The problem is that only the Single line (block8) doesn't appear on the page. The unfortunate thing is that it is that one I use most. |
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
|
Looks like you need to add:
border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1pt; To the block8 style definition. Steve |
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,200
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Ah, I see now, the Single line is missing, that's probably because its width is too small, html rendering engines refuse to draw things below a certain width, I'll see if it can be fixed.
|
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,200
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I had a look, the Single line is represented as a drawing in Word, the others as paragraph borders. The conversion does not support drawings, so the line is missing. I'll see if it is possible to recognize this particular drawing and convert it into an <hr>, it will depend on if Word marks it up the same way every time.
|
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,200
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#14 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
|
Installed Calibre (0.9.38)
Job's a good un! Thanks |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-600 Blank Screen with Horizontal Lines | Coreman | Sony Reader | 5 | 06-27-2013 12:38 PM |
Centered lines and conversion to epub | starrigger | Conversion | 46 | 09-07-2012 11:18 PM |
Help: blank screen and horizontal lines | wildabandon | iRiver Story | 4 | 03-29-2011 02:39 PM |
Black horizontal lines in pdf viewer | yokos | iRex | 12 | 09-20-2010 02:09 PM |
PRS-600 Faint Screen tiny horizontal lines | alex3l | Sony Reader | 3 | 05-02-2010 08:45 PM |