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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-06-2013, 05:44 AM   #16
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: 44,550
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Word can do font subsetting when embedding and this is 2013 wasting a few kilobytes to ensure that your document looks the same to someone else on a different computer/device is totally worth it.

But, as I said, I am happy to make it an option. To get you started, look in flatcss.py where the embed_font_family option is handled.
kovidgoyal is offline   Reply With Quote
Old 06-07-2013, 05:42 AM   #17
SauliusP.
Plugin developer
SauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notes
 
SauliusP.'s Avatar
 
Posts: 108
Karma: 24394
Join Date: Feb 2012
Location: Lithuania
Device: Kindle
Another exception:

Spoiler:
Convert book 1 of 1 (Sodininkas iš Prancūzijos)
Resolved conversion options
calibre version: 0.9.33
{'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(., '\\s*((chapter|book|section|part)\\s+)|((prolog|pr ologue|epilogue)(\\s+|$))', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': u'/tmp/calibre_0.9.33_tmp_UyV7F4/WU2aQl.jpeg',
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_split_on_page_breaks': False,
'duplicate_links_in_toc': False,
'embed_font_family': None,
'enable_heuristics': False,
'epub_flatten': False,
'extra_css': None,
'extract_to': None,
'filter_css': u'',
'fix_indents': True,
'flow_size': 260,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x26a0a10>,
'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': u'//h:h1',
'level2_toc': u'//h:h2',
'level3_toc': u'//h:h3',
'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,
'no_chapters_in_toc': False,
'no_default_epub_cover': True,
'no_inline_navbars': False,
'no_svg_cover': True,
'output_profile': <calibre.customize.profiles.OutputProfile object at 0x26a0dd0>,
'page_breaks_before': None,
'prefer_metadata_cover': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': u'/tmp/calibre_0.9.33_tmp_UyV7F4/6XK8BI.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': u'',
'search_replace': '[]',
'series': None,
'series_index': None,
'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': False,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: DOCX Input running
on /tmp/calibre_0.9.33_tmp_UyV7F4/r772NR.docx
Traceback (most recent call last):
File "site.py", line 58, in main
File "/Advanced/workspace/Calibre/src/calibre/utils/ipc/worker.py", line 189, in main
result = func(*args, **kwargs)
File "/Advanced/workspace/Calibre/src/calibre/gui2/convert/gui_conversion.py", line 31, in gui_convert_override
override_input_metadata=True)
File "/Advanced/workspace/Calibre/src/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert
plumber.run()
File "/Advanced/workspace/Calibre/src/calibre/ebooks/conversion/plumber.py", line 1010, in run
accelerators, tdir)
File "/Advanced/workspace/Calibre/src/calibre/customize/conversion.py", line 239, in __call__
log, accelerators)
File "/Advanced/workspace/Calibre/src/calibre/ebooks/conversion/plugins/docx_input.py", line 21, in convert
return Convert(stream, log=log)()
File "/Advanced/workspace/Calibre/src/calibre/ebooks/docx/to_html.py", line 89, in __call__
p = self.convert_p(wp)
File "/Advanced/workspace/Calibre/src/calibre/ebooks/docx/to_html.py", line 314, in convert_p
span = self.convert_run(x)
File "/Advanced/workspace/Calibre/src/calibre/ebooks/docx/to_html.py", line 433, in convert_run
for img in self.images.to_html(child, self.current_page, self.docx, self.dest_dir):
File "/Advanced/workspace/Calibre/src/calibre/ebooks/docx/images.py", line 218, in to_html
for tag in self.pict_to_html(elem, page):
File "/Advanced/workspace/Calibre/src/calibre/ebooks/docx/images.py", line 171, in pict_to_html
img(alt=alt)
TypeError: 'HtmlElement' object is not callable


Let me know if you'd like to see the document itself and how to pass private material (would private message suit?).
SauliusP. is offline   Reply With Quote
Advert
Old 06-07-2013, 06:32 AM   #18
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: 44,550
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Fixed.
kovidgoyal is offline   Reply With Quote
Old 06-07-2013, 08:08 AM   #19
SauliusP.
Plugin developer
SauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notes
 
SauliusP.'s Avatar
 
Posts: 108
Karma: 24394
Join Date: Feb 2012
Location: Lithuania
Device: Kindle
Hi again. Side by side comparision of new (left) and mine (right) DOCX plugin results.

Few conversion flaws:
  • Underline styling out of nowhere (allright, I had been there too, Word nested styling and re-styling makes a headache)
  • No page break (Heading1 style in this document has "Page break before" turned on). There are also few ignored manual page breaks.
  • Additional description paragraph under heading has no space after it
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2013-06-07 14:01:54.png
Views:	336
Size:	204.6 KB
ID:	106719   Click image for larger version

Name:	Screenshot from 2013-06-07 14:02:29.png
Views:	316
Size:	198.7 KB
ID:	106720  
SauliusP. is offline   Reply With Quote
Old 06-07-2013, 08:12 AM   #20
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: 44,550
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you want to report bugs, you need to provide a docx file that causes the bug.
kovidgoyal is offline   Reply With Quote
Advert
Old 06-07-2013, 08:16 AM   #21
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: 44,550
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If the file is copyrighted you can always open a private bug report and attach it to that.
kovidgoyal is offline   Reply With Quote
Old 06-07-2013, 08:18 AM   #22
SauliusP.
Plugin developer
SauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notesSauliusP. can name that song in three notes
 
SauliusP.'s Avatar
 
Posts: 108
Karma: 24394
Join Date: Feb 2012
Location: Lithuania
Device: Kindle
Quote:
Originally Posted by kovidgoyal View Post
If you want to report bugs, you need to provide a docx file that causes the bug.
Done on Launchpad.
SauliusP. is offline   Reply With Quote
Reply

Tags
calibre, docx input

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Input Plugin] DOCX Input SauliusP. Plugins 42 06-05-2013 05:01 AM
DOCX Input and DOCX Metadata Reader SauliusP. Development 5 06-15-2012 03:17 AM
Calibre native app on iphone for reading news? bigreat Calibre 2 07-22-2010 12:50 AM
XML input into calibre cremofix Calibre 3 05-18-2009 07:38 AM


All times are GMT -4. The time now is 07:05 AM.


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