Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
conversion failure/bug - epub-rtf-mobi
I have a series of books, all from from same source, in epub & mobi which have the "wide left margin" annoyance in their mobi formats.
after some trial & error I found that I could most easlily lose the wide margin by converting epub version to rtf then converting the rtf to mobi, all within calibre. ( it seemingly has to be via intermediate .rtf, I tried e.g. epub to mobi but margins did not change, seems to be due to complex embedded .css formatting ? )
the 2 step process worked fine for 8 out of 9 books but the odd one out gives me a conversion error when converting back from .rtf
i.e. calibre cannot handle it's own rtf creation!
can anyone explain why please and/or suggest an alternative margin fix:
ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Excession)
Convert book 1 of 1 (Excession)
Resolved conversion options
calibre version: 0.7.31
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_justification': u'original',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part\\s+', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': 'c:\\users\\dad\\appdata\\local\\temp\\calibre_0.7 .31_tmp_kyfc6g\\calibre_0.7.31_e86cla.jpeg',
'debug_pipeline': None,
'disable_font_rescaling': False,
'dont_compress': False,
'extra_css': None,
'font_size_mapping': None,
'footer_regex': u'(?i)(?<=<hr>)((\\s*<a name=\\d+></a>((<img.+?>)*<br>\\s*)?\\d+<br>\\s*.*?\\s*)|(\\s* <a name=\\d+></a>((<img.+?>)*<br>\\s*)?.*?<br>\\s*\\d+))(?=<br>)' ,
'header_regex': u'(?i)(?<=<hr>)((\\s*<a name=\\d+></a>((<img.+?>)*<br>\\s*)?\\d+<br>\\s*.*?\\s*)|(\\s* <a name=\\d+></a>((<img.+?>)*<br>\\s*)?.*?<br>\\s*\\d+))(?=<br>)' ,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x0568E7B0>,
'insert_blank_line': False,
'insert_metadata': False,
'isbn': None,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 0.0,
'margin_right': 5.0,
'margin_top': 5.0,
'max_toc_links': 50,
'no_chapters_in_toc': False,
'no_inline_navbars': True,
'no_inline_toc': False,
'output_profile': <calibre.customize.profiles.KindleOutput object at 0x0568EA90>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'personal_doc': u'[PDOC]',
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'preprocess_html': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': 'c:\\users\\dad\\appdata\\local\\temp\\calibre_0.7 .31_tmp_kyfc6g\\calibre_0.7.31_82_ren.opf',
'remove_first_image': False,
'remove_footer': False,
'remove_header': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'rescale_images': False,
'series': None,
'series_index': None,
'smarten_punctuation': True,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: RTF Input running
on C:\Users\dad\Documents\Calibre Library\Iain M. Banks\Excession (400)\Excession - Iain M. Banks.rtf
Converting RTF to XML...
Preprocessing to convert unicode characters
File "preprocessed.rtf" does not appear to be RTF.
Python function terminated unexpectedly
Invalid RTF: document does not have matching brackets.
(Error Code: 1)
Traceback (most recent call last):
File "site.py", line 103, in main
File "site.py", line 85, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 107, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 24, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 836, in run
File "site-packages\calibre\customize\conversion.py", line 216, in __call__
File "site-packages\calibre\ebooks\rtf\input.py", line 254, in convert
File "site-packages\calibre\ebooks\rtf\input.py", line 119, in generate_xml
File "site-packages\calibre\ebooks\rtf2xml\ParseRtf.py", line 238, in parse_rtf
calibre.ebooks.rtf2xml.ParseRtf.InvalidRtfExceptio n: Invalid RTF: document does not have matching brackets.
Last edited by cybmole; 12-03-2010 at 02:39 AM.
|