Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 05-08-2021, 05:23 PM   #1
STrRedWolf
Junior Member
STrRedWolf began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2020
Device: Kindle
Image handling from imported DOCX/ODT

I'm near tearing my hair out here. I'm trying to get my novel into an AZW3 and... the images are not handling right. I'm using LibreOffice, and Calibre 4.99.12 (based off of my Xubuntu 20.10 install).

If I convert it off the ODT file, and upload it to a Kindle Paperwhite to test, the "Among the Throng" header I use for in-story blog posts is shifted to the right. If I move the image out from an H2, it shifts closer, but it has a "left" CSS entry that the Kindle seems to enforce.

If I save the ODT into DOCX format, convert the DOCX, and then upload it, the side "avatar" image for who's writing the blog post blows up to near full-screen on the Kindle. The header is *perfect* but the avatar is a mess.

Here's the conversion log for the DOCX:
Spoiler:
Convert book 1 of 1 (GS2S CH 1 DOC)
Conversion options changed from defaults:
docx_no_cover: True
embed_all_fonts: True
cover: '/tmp/calibre_4.99.12_tmp_ih6c96m0/wr2wjfwo.jpeg'
level1_toc: '//h:h1'
output_profile: 'kindle_pw3'
read_metadata_from_opf: '/tmp/calibre_4.99.12_tmp_ih6c96m0/7orgs2oa.opf'
debug_pipeline: '/home/tygris/debug'
subset_embedded_fonts: True
verbose: 2
level2_toc: '//h:h2'
Resolved conversion options
calibre version: 4.99.12
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_justification': 'original',
'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "
"'\\s*((chapter|book|section|part)\\s+)|((prolog|p rologue|epilogue)(\\s+|$))', "
"'i')) or @class = 'chapter']",
'chapter_mark': 'pagebreak',
'comments': None,
'cover': '/tmp/calibre_4.99.12_tmp_ih6c96m0/wr2wjfwo.jpeg',
'debug_pipeline': '/home/tygris/debug',
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'docx_inline_subsup': False,
'docx_no_cover': True,
'docx_no_pagebreaks_between_notes': False,
'dont_compress': False,
'duplicate_links_in_toc': False,
'embed_all_fonts': True,
'embed_font_family': None,
'enable_heuristics': False,
'expand_css': False,
'extra_css': None,
'extract_to': None,
'filter_css': '',
'fix_indents': True,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x7fe917b793d0>,
'insert_blank_line': False,
'insert_blank_line_size': 0.5,
'insert_metadata': False,
'isbn': None,
'italicize_common_cases': True,
'keep_ligatures': False,
'language': None,
'level1_toc': '//h:h1',
'level2_toc': '//h:h2',
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'markup_chapter_headings': True,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'mobi_toc_at_start': False,
'no_chapters_in_toc': False,
'no_inline_navbars': False,
'no_inline_toc': False,
'output_profile': <calibre.customize.profiles.KindlePaperWhite3Outpu t object at 0x7fe917b799d0>,
'page_breaks_before': '/',
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': '/tmp/calibre_4.99.12_tmp_ih6c96m0/7orgs2oa.opf',
'remove_fake_margins': True,
'remove_first_image': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'replace_scene_breaks': '',
'search_replace': '[]',
'series': None,
'series_index': None,
'share_not_sync': False,
'smarten_punctuation': False,
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'start_reading_at': None,
'subset_embedded_fonts': True,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'transform_css_rules': '[]',
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: DOCX Input running
on /tmp/calibre_4.99.12_tmp_ih6c96m0/8nckrbbb.docx
Converting Word markup to HTML
Converting styles to CSS
Cleaning up redundant markup generated by Word
Generating Table of Contents from headings
Input debug saved to: /home/tygris/debug/input
Parsing all content...
Parsing docx.css ...
Parsing index.html ...
Initial parse failed, using more forgiving parsers
Parsing index.html as HTML
Reading TOC from NCX...
Parsed HTML written to: /home/tygris/debug/parsed
Merging user specified metadata...
Detecting structure...
Structured HTML written to: /home/tygris/debug/structure
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Found 151 items of level: p_1
p_1 left margin stats: Counter({'0': 151})
p_1 right margin stats: Counter({'0': 151})
Embedding font Arial Bold from /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf
Embedding font Arial from /usr/share/fonts/truetype/msttcorefonts/arial.ttf
Embedding font Times New Roman from /usr/share/fonts/truetype/msttcorefonts/times.ttf
Embedding font Times New Roman Italic from /usr/share/fonts/truetype/msttcorefonts/timesi.ttf
Embedding font Times New Roman Bold from /usr/share/fonts/truetype/msttcorefonts/timesbd.ttf
Embedding font Times New Roman Bold Italic from /usr/share/fonts/truetype/msttcorefonts/timesbi.ttf
Decreased the font fonts/Arial-Bold.ttf to 28.1% of its original size
The font fonts/Arial.ttf is unused. Removing it.
Decreased the font fonts/Times-New-Roman.ttf to 32.3% of its original size
Decreased the font fonts/Times-New-Roman-Italic.ttf to 30.0% of its original size
Decreased the font fonts/Times-New-Roman-Bold.ttf to 26.3% of its original size
Decreased the font fonts/Times-New-Roman-Bold-Italic.ttf to 27.5% of its original size
Reduced total font size to 24.2% of original
Cleaning up manifest...
Trimming unused files from manifest...
Processed HTML written to: /home/tygris/debug/processed
Creating AZW3 Output...
Serializing resources...
Failed to generate thumbnail
Splitting markup on page breaks and flow limits, if any...
Creating KF8 output
Generating KF8 markup...
Compressing markup...
Creating indices...
AZW3 output written to /tmp/calibre_4.99.12_tmp_ih6c96m0/v_vx__cd.azw3


And for the ODT
Spoiler:
Convert book 1 of 1 (GS2S CH 1)
Conversion options changed from defaults:
embed_all_fonts: True
cover: '/tmp/calibre_4.99.12_tmp_ih6c96m0/mdqh7utf.jpeg'
level1_toc: '//h:h1'
read_metadata_from_opf: '/tmp/calibre_4.99.12_tmp_ih6c96m0/tfxlmy_9.opf'
subset_embedded_fonts: True
verbose: 2
level2_toc: '//h:h2'
debug_pipeline: '/home/tygris/debug'
Resolved conversion options
calibre version: 4.99.12
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_justification': 'original',
'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "
"'\\s*((chapter|book|section|part)\\s+)|((prolog|p rologue|epilogue)(\\s+|$))', "
"'i')) or @class = 'chapter']",
'chapter_mark': 'pagebreak',
'comments': None,
'cover': '/tmp/calibre_4.99.12_tmp_ih6c96m0/mdqh7utf.jpeg',
'debug_pipeline': '/home/tygris/debug',
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_compress': False,
'duplicate_links_in_toc': False,
'embed_all_fonts': True,
'embed_font_family': None,
'enable_heuristics': False,
'expand_css': False,
'extra_css': None,
'extract_to': None,
'filter_css': '',
'fix_indents': True,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x7f9ac09da3d0>,
'insert_blank_line': False,
'insert_blank_line_size': 0.5,
'insert_metadata': False,
'isbn': None,
'italicize_common_cases': True,
'keep_ligatures': False,
'language': None,
'level1_toc': '//h:h1',
'level2_toc': '//h:h2',
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'markup_chapter_headings': True,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'mobi_toc_at_start': False,
'no_chapters_in_toc': False,
'no_inline_navbars': False,
'no_inline_toc': False,
'output_profile': <calibre.customize.profiles.OutputProfile object at 0x7f9ac09da6a0>,
'page_breaks_before': "//*[name()='h1' or name()='h2']",
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': '/tmp/calibre_4.99.12_tmp_ih6c96m0/tfxlmy_9.opf',
'remove_fake_margins': True,
'remove_first_image': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'replace_scene_breaks': '',
'search_replace': '[]',
'series': None,
'series_index': None,
'share_not_sync': False,
'smarten_punctuation': False,
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'start_reading_at': None,
'subset_embedded_fonts': True,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'transform_css_rules': '[]',
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: ODT Input running
on /tmp/calibre_4.99.12_tmp_ih6c96m0/8enmzs8j.odt
Extracting ODT file...
Input debug saved to: /home/tygris/debug/input
Parsing all content...
Parsing odfpy.css ...
Parsing index.xhtml ...
Generating default TOC from spine...
Parsed HTML written to: /home/tygris/debug/parsed
Merging user specified metadata...
Detecting structure...
Detected chapter: Chapter 1 Boston
Auto generated TOC with 2 entries.
Structured HTML written to: /home/tygris/debug/structure
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Found 149 items of level: p_1
Found 2 items of level: div_2
Found 1 items of level: div_1
Found 3 items of level: p_3
Ignoring level p_3
p_1 left margin stats: Counter({'0': 149})
p_1 right margin stats: Counter({'0': 149})
div_2 left margin stats: Counter()
div_2 right margin stats: Counter()
div_1 left margin stats: Counter()
div_1 right margin stats: Counter()
Embedding font Arial Bold from /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf
Embedding font Times New Roman Italic from /usr/share/fonts/truetype/msttcorefonts/timesi.ttf
Embedding font Times New Roman from /usr/share/fonts/truetype/msttcorefonts/times.ttf
Embedding font Times New Roman Bold from /usr/share/fonts/truetype/msttcorefonts/timesbd.ttf
Embedding font Times New Roman Bold Italic from /usr/share/fonts/truetype/msttcorefonts/timesbi.ttf
Embedding font Liberation Serif Bold from /usr/share/calibre/fonts/liberation/LiberationSerif-Bold.ttf
Embedding font Liberation Serif from /usr/share/calibre/fonts/liberation/LiberationSerif-Regular.ttf
Embedding font OpenSymbol from /usr/share/fonts/truetype/libreoffice/opens___.ttf
Decreased the font fonts/Arial-Bold.ttf to 28.1% of its original size
Decreased the font fonts/Times-New-Roman-Italic.ttf to 30.0% of its original size
Decreased the font fonts/Times-New-Roman.ttf to 32.3% of its original size
Decreased the font fonts/Times-New-Roman-Bold.ttf to 26.3% of its original size
Decreased the font fonts/Times-New-Roman-Bold-Italic.ttf to 27.5% of its original size
Decreased the font fonts/Liberation-Serif-Bold.ttf to 12.9% of its original size
Decreased the font fonts/Liberation-Serif.ttf to 12.5% of its original size
Decreased the font fonts/OpenSymbol.ttf to 9.2% of its original size
Reduced total font size to 24.3% of original
Cleaning up manifest...
Trimming unused files from manifest...
Processed HTML written to: /home/tygris/debug/processed
Creating AZW3 Output...
Serializing resources...
Failed to generate thumbnail
Splitting markup on page breaks and flow limits, if any...
Splitting on page-break at id=calibre_toc_1
Splitting on page-break at id=calibre_toc_2
Split into 2 parts
Creating KF8 output
Generating in-line ToC
Generating KF8 markup...
Compressing markup...
Creating indices...
AZW3 output written to /tmp/calibre_4.99.12_tmp_ih6c96m0/svqkxuc8.azw3


Any ideas? I've attached a sample chapter that illustrates the problem.
Attached Files
File Type: zip GS2S_CH1.zip (99.7 KB, 38 views)

Last edited by BetterRed; 05-08-2021 at 06:41 PM. Reason: changed 'quote's to 'spoiler's
STrRedWolf is offline   Reply With Quote
Old 05-08-2021, 06:52 PM   #2
retiredbiker
Addict
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 223
Karma: 232318
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Looking at your files in Writer, the images are anchored "to Paragraph" in the odt and "to Character" in the docx. I'm not sure how the anchoring in Writer translates during conversion, but you could try adjusting that.

Personally, I never try and do anything much with images in Writer, because I know they will almost never look just the same (or even close!) in an epub (or azw3) after conversion. I just insert them where they need to be, anchored "as character" since that seems to generate less messy code. Then I use the Editor with the converted book to code the images as I actually want them to appear. And that seems to involve some black magic, since a given image and it's coding that I make look great on my Kobo, will often fail after a conversion to azw3 for my Kindle, and I have to edit it again. Or vice-versa.

The bottom line is, Calibre always makes some assumptions in converting. You never get exactly the look of the word processor file. I used to go crazy messing with the conversion options, and ended up just learning how to edit the things. It's easier in the long run.

Or look into a product like Jutoh, a desktop ebook publishing tool meant more for professional output. Jutoh has an "almost WYSIWYG" interface, and when you use it to compile an epub, for example, it delivers a very faithful rendition.
retiredbiker is offline   Reply With Quote
Advert
Old 05-08-2021, 07:14 PM   #3
STrRedWolf
Junior Member
STrRedWolf began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2020
Device: Kindle
Quote:
Originally Posted by retiredbiker View Post
Or look into a product like Jutoh, a desktop ebook publishing tool meant more for professional output. Jutoh has an "almost WYSIWYG" interface, and when you use it to compile an epub, for example, it delivers a very faithful rendition.
Will it export out to AZW3? I saw it go into epub and a limited epub when I tried the latest on an Raspberry Pi 4.
STrRedWolf is offline   Reply With Quote
Old 05-09-2021, 12:32 AM   #4
retiredbiker
Addict
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 223
Karma: 232318
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Quote:
Originally Posted by STrRedWolf View Post
Will it export out to AZW3? I saw it go into epub and a limited epub when I tried the latest on an Raspberry Pi 4.
I have a the 2.97 version, and no, it doesn't do Amazon formats directly; that may have changed in 3.xx but I don't know. 2.xx can only call Kindlegen and make a mobi (quaint, at this time in history).

Calibre's epub to azw3 conversion is very good; that is what I use. I rarely have to edit anything doing that (books for my own use, anyway...if doing work for an author you can make NO assumptions about conversion). But even Amazon wants an epub from you, and they do their own thing with it.

Last edited by retiredbiker; 05-09-2021 at 12:41 AM.
retiredbiker is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
doc/docx/odt - save highlights inside the file (as with pdf) kmoll KOReader 17 03-28-2020 04:59 PM
images not imported after conversion from epub to docx using Calibre 3.6(64bit) csridharbasis Conversion 9 08-27-2017 10:21 PM
Track changes in odt and docx files mcdummy Calibre 1 05-03-2016 07:18 AM
Image Lost During ODT > ePub Conversion Foothills Conversion 12 08-24-2012 08:26 AM
Handling imported styles MacEachaidh Sigil 3 07-25-2010 07:06 AM


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


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