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 03-03-2018, 11:08 AM   #1
uka
Junior Member
uka began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2018
Device: Kindle
EPUB to MOBI (AZW3). Black SVG images with CSS styles

Is there a way to keep SVG styles inside CDATA tag?
If debugging is enabled they are present in "input" directory and disappear in "parsed" directory. When I use kindlegen CDATA tags are keeped and images looks good on reader, when they are removed SVGs are black.

I tested it on Paperwhite 3 and Kindle 7. I attach screenshots.
Attached Thumbnails
Click image for larger version

Name:	screenshot_2018_03_03T14_48_36+0100.png
Views:	281
Size:	46.4 KB
ID:	162599   Click image for larger version

Name:	screenshot_2018_03_03T14_59_01+0100.png
Views:	273
Size:	56.6 KB
ID:	162600  
Attached Files
File Type: epub eloquent-javascript.epub (1.44 MB, 191 views)
File Type: mobi eloquent-javascript.mobi (3.75 MB, 227 views)

Last edited by uka; 03-03-2018 at 11:31 AM. Reason: Add files
uka is offline   Reply With Quote
Old 03-03-2018, 11:15 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,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://www.mobileread.com/forums/sh...d.php?t=186697
kovidgoyal is offline   Reply With Quote
Advert
Old 03-03-2018, 03:51 PM   #3
uka
Junior Member
uka began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2018
Device: Kindle
Here is conversion log:

Code:
Conversion options changed from defaults:
  remove_first_image: True
  cover: u'/mnt/c/Users/home/Desktop/Eloquent-JavaScript/img/cover.jpg'
  verbose: 2
  no_inline_toc: True
  mobi_file_type: u'both'
Resolved conversion options
calibre version: 3.14.0
{'asciiize': False,
 'author_sort': None,
 'authors': None,
 'base_font_size': 0,
 'book_producer': None,
 'change_justification': 'original',
 'chapter': "//*[((name()='h1' or name()='h2') and re:test(., '\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', 'i')) or @class = 'chapter']",
 'chapter_mark': 'pagebreak',
 'comments': None,
 'cover': u'/mnt/c/Users/home/Desktop/Eloquent-JavaScript/img/cover.jpg',
 'debug_pipeline': None,
 'dehyphenate': True,
 'delete_blank_paragraphs': True,
 'disable_font_rescaling': False,
 'dont_compress': False,
 'duplicate_links_in_toc': False,
 'embed_all_fonts': False,
 'embed_font_family': None,
 'enable_heuristics': False,
 'expand_css': False,
 'extra_css': None,
 'extract_to': None,
 'filter_css': None,
 '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 0x7f9609bb3990>,
 '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': None,
 'level2_toc': None,
 'level3_toc': None,
 'line_height': 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_file_type': u'both',
 'mobi_ignore_margins': False,
 'mobi_keep_original_images': False,
 'mobi_toc_at_start': False,
 'no_chapters_in_toc': False,
 'no_inline_navbars': False,
 'no_inline_toc': True,
 'output_profile': <calibre.customize.profiles.OutputProfile object at 0x7f9609bb3d50>,
 'page_breaks_before': '/',
 'personal_doc': '[PDOC]',
 'prefer_author_sort': False,
 'prefer_metadata_cover': False,
 'pretty_print': False,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': None,
 'remove_fake_margins': True,
 'remove_first_image': True,
 'remove_paragraph_spacing': False,
 'remove_paragraph_spacing_indent_size': 1.5,
 'renumber_headings': True,
 'replace_scene_breaks': '',
 'search_replace': None,
 'series': None,
 'series_index': None,
 'share_not_sync': False,
 'smarten_punctuation': False,
 'sr1_replace': '',
 'sr1_search': '',
 'sr2_replace': '',
 'sr2_search': '',
 'sr3_replace': '',
 'sr3_search': '',
 'start_reading_at': None,
 'subset_embedded_fonts': False,
 'tags': None,
 'timestamp': None,
 'title': None,
 'title_sort': None,
 'toc_filter': None,
 'toc_threshold': 6,
 'toc_title': None,
 'transform_css_rules': None,
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
1% Converting input to HTML...
InputFormatPlugin: EPUB Input running
on /mnt/c/Users/home/Desktop/Eloquent-JavaScript/book.epub
Parsing all content...
Parsing 16_game.xhtml ...
Parsing 13_browser.xhtml ...
Parsing 14_dom.xhtml ...
Parsing 15_event.xhtml ...
Parsing 11_async.xhtml ...
Parsing frontmatter.xhtml ...
Parsing 04_data.xhtml ...
Parsing 12_language.xhtml ...
Parsing 10_modules.xhtml ...
Parsing toc.xhtml ...
Parsing 05_higher_order.xhtml ...
Parsing 00_intro.xhtml ...
Parsing 01_values.xhtml ...
Parsing 06_object.xhtml ...
Parsing titlepage.xhtml ...
Parsing 03_functions.xhtml ...
Parsing 02_program_structure.xhtml ...
Parsing 07_robot.xhtml ...
Parsing 08_error.xhtml ...
Parsing 17_canvas.xhtml ...
Parsing 20_node.xhtml ...
Parsing style.css ...
Parsing 19_paint.xhtml ...
Parsing 09_regexp.xhtml ...
Parsing 18_http.xhtml ...
Parsing hints.xhtml ...
Parsing 21_skillsharing.xhtml ...
Reading TOC from NCX...
34% Running transforms on e-book...
Removed first image
Removing titlepage.xhtml as it has no content
Merging user specified metadata...
Detecting structure...
Flattening CSS and remapping font sizes...
Source base font size is 14.40000pt
Removing fake margins...
Found 56 items of level: div_3
Found 79 items of level: div_2
Found 2 items of level: div_6
Found 210 items of level: p_4
Found 2282 items of level: p_2
Found 25 items of level: p_3
Found 5 items of level: p_1
Ignoring level p_1
Ignoring level div_6
div_3  left margin stats: Counter({u'': 56})
div_3  right margin stats: Counter({u'': 56})
div_2  left margin stats: Counter({u'': 15})
div_2  right margin stats: Counter({u'': 15})
p_4  left margin stats: Counter({u'0': 210})
p_4  right margin stats: Counter({u'0': 210})
p_2  left margin stats: Counter({u'0': 2282})
p_2  right margin stats: Counter({u'0': 2282})
p_3  left margin stats: Counter({u'': 25})
p_3  right margin stats: Counter({u'': 25})
Cleaning up manifest...
Trimming unused files from manifest...
Creating MOBI Output...
67% Running MOBI Output plugin
Serializing resources...
Splitting markup on page breaks and flow limits, if any...
Creating KF8 output
	Generating KF8 markup...
	Compressing markup...
	Creating indices...
Creating MOBI 6 output
Applying case-transforming CSS...
Parsing manglecase.css ...
Rasterizing SVG images...
Rasterizing u'img/controlflow-straight.svg' to 1280x119
Rasterizing u'img/controlflow-if.svg' to 1280x530
Rasterizing u'img/controlflow-nested-if.svg' to 1280x559
Rasterizing u'img/controlflow-loop.svg' to 1280x447
Rasterizing u'img/pizza-squirrel.svg' to 1280x874
Rasterizing u'img/linked-list.svg' to 1280x247
Rasterizing u'img/rabbits.svg' to 1280x542
Rasterizing u'img/re_pigchickens.svg' to 1280x343
Rasterizing u'img/re_number.svg' to 1280x757
Rasterizing u'img/re_slow.svg' to 1280x1061
Rasterizing u'img/control-io.svg' to 1280x604
Rasterizing u'img/syntax_tree.svg' to 845x1200
Rasterizing u'img/html-boxes.svg' to 1032x1200
Rasterizing u'img/html-tree.svg' to 1280x755
Rasterizing u'img/html-links.svg' to 1280x1136
Rasterizing u'img/cos_sin.svg' to 1280x848
Rasterizing u'img/game-grid.svg' to 1280x1075
Rasterizing u'img/transform.svg' to 1280x451
Rasterizing u'img/mirror.svg' to 1280x600
Rasterizing u'img/flood-grid.svg' to 1280x558
Rasterizing u'img/line-grid.svg' to 1280x558
Converting XHTML to Mobipocket markup...
Serializing markup content...
  Compressing markup content...
Generating MOBI index for a book
MOBI output written to /mnt/c/Users/home/Desktop/Eloquent-JavaScript/book.mobi
Output saved to   /mnt/c/Users/home/Desktop/Eloquent-JavaScript/book.mobi

Last edited by uka; 03-03-2018 at 05:28 PM.
uka is offline   Reply With Quote
Old 03-03-2018, 07:53 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,835
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Don't convert to both. Convert to KF8 only.
JSWolf is offline   Reply With Quote
Old 03-03-2018, 10:41 PM   #5
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,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
According to the conversion log you are converting to joint MOBI, not azw3. Does the problem still occur when you convert to only azw3 (which will not cause the SVG files to be rasterized).
kovidgoyal is offline   Reply With Quote
Advert
Old 03-04-2018, 02:01 PM   #6
uka
Junior Member
uka began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2018
Device: Kindle
I noticed that happens when I send file to Kindle by e-mail. When I transfer mobi file attached above via USB SVG images looks normal.
uka is offline   Reply With Quote
Old 03-04-2018, 09:50 PM   #7
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,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
When you send books by email they are re-processed by amazon. calibre has no control over that. Stick to USB transfer as much as possible.
kovidgoyal is offline   Reply With Quote
Reply

Tags
ebook-convert, kindle, svg images

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ePub -> AZW3 bug: inline ToC gets wrong styles Phssthpok Conversion 11 07-14-2015 10:52 AM
Images going from ePub tu mobi or azw3 format valegar44 Kindle Formats 2 09-09-2014 01:07 AM
Kobo Touch Displays Some SVG Images as Black Rectangles MikeWV Kobo Reader 15 07-10-2014 04:06 PM
Touch SVG Images Often Appear as Black Rectangles MikeWV Kobo Reader 3 07-09-2014 01:13 PM
can I use SVG images in mobi? sarah_pnix Kindle Formats 4 01-07-2013 04:21 PM


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


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