Centered images aren't centered after conversion

Bug #1905319 reported by Kimberly Dean
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

When converting a .docx file to an .epub file, images that were centered in the .docx file end up left-aligned in the epub.

This seems to be an issue that was recently introduced. A file I converted on 10/31/20 did not have this issue. The file I converted 11/22/20 did.

I am currently using Calibre 5.5 [64bit] but know that I had at least one version change between converting those two files.

Operating system: Windows

I'm attaching the input file Lexie_test.docx. See section titled "Triplet series" for images that are centered.

Output file is Lexie - Kimberly Dean.epub. See section titled "Triplet series" for images that are left-aligned.

Revision history for this message
Kimberly Dean (kdean2) wrote :
  • input file Edit (107.1 KiB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
Revision history for this message
Kimberly Dean (kdean2) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1905319

I tried your attached docx file with calibre 4.10.0 which is almost a
year old and got the same result. I dont think calibre has ever centered
such images. Check your previously converted file and use whatever form
of image positioning you are using there for similar results.

Revision history for this message
Kovid Goyal (kovid) wrote :

And taking a look at the internals of your file, it's because it is using
an obsolete form of markup for the images (VML). calibre doesn't really
support conversion of this markup, defaulting to just placing the image
as a block on its own, which is not styled in anyway, therefore not
centered. If you simply delete the images and re-insert them in word
you should be fine, as Word will use modern markup automatically.

That said, I will change calibre in the next release to not put such
images in a block on their own, which will fix your issue, since they
will inherit the centering from the parapgraph they are in.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1905319
Revision history for this message
Kimberly Dean (kdean2) wrote :

Thank you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.