EPUB to PDF conversion fails

Bug #1203449 reported by P. Alevantis on 2013-07-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

With calibre 0.9.40 64-bit (running under Windows 7 64-bit) but the same arrived with version 39) I try to convert from EPUB (book attached) to PDF and the conversion fails.
Please advice ...
Thanks in advance
P. Alevantis
________________________
Here is the log file:

calibre, version 0.9.40 (win32, isfrozen: True)
Conversion Error: Failed: Convert book 1 of 1 (Cracked: Why Psychiatry is Doing More Harm Than Good)

Convert book 1 of 1 (Cracked: Why Psychiatry is Doing More Harm Than Good)
Resolved conversion options
calibre version: 0.9.40
{'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|prologue|epilogue)(\\s+|$))', 'i')) or @class = 'chapter']",
 'chapter_mark': u'pagebreak',
 'comments': None,
 'cover': u'C:\\Users\\ADMIN\\AppData\\Local\\Temp\\calibre_s0jyon\\anwn3q.jpeg',
 'custom_size': None,
 'debug_pipeline': None,
 'dehyphenate': True,
 'delete_blank_paragraphs': True,
 'disable_font_rescaling': False,
 'duplicate_links_in_toc': False,
 'embed_all_fonts': False,
 'embed_font_family': None,
 'enable_heuristics': False,
 'extra_css': None,
 'filter_css': u'',
 '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 0x0000000004B97B70>,
 '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.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_inline_navbars': False,
 'old_pdf_engine': False,
 'output_profile': <calibre.customize.profiles.iPad3Output object at 0x0000000004B99080>,
 'override_profile_size': False,
 'page_breaks_before': u'/',
 'paper_size': u'letter',
 'pdf_add_toc': False,
 'pdf_default_font_size': 20,
 'pdf_footer_template': None,
 'pdf_header_template': None,
 'pdf_mark_links': False,
 'pdf_mono_family': u'Courier New',
 'pdf_mono_font_size': 16,
 'pdf_page_numbers': False,
 'pdf_sans_family': u'Agency FB',
 'pdf_serif_family': u'Times New Roman',
 'pdf_standard_font': u'serif',
 'prefer_metadata_cover': False,
 'preserve_cover_aspect_ratio': False,
 'pretty_print': False,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': u'C:\\Users\\ADMIN\\AppData\\Local\\Temp\\calibre_s0jyon\\tptgvx.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,
 'uncompressed_pdf': False,
 'unit': u'inch',
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
InputFormatPlugin: EPUB Input running
on C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\2q9uvh.epub
Found HTML cover titlepage.xhtml
Parsing all content...
Parsing text/part0013.html ...
Parsing text/part0022.html ...
Parsing text/part0021.html ...
Parsing text/part0014.html ...
Parsing text/part0023.html ...
Parsing text/part0015.html ...
Parsing text/part0005.html ...
Parsing text/part0003.html ...
Parsing titlepage.xhtml ...
Parsing text/part0016.html ...
Parsing stylesheet.css ...
Parsing text/part0017.html ...
Parsing page_styles.css ...
Parsing text/part0000.html ...
Parsing text/part0018.html ...
Parsing text/part0001.html ...
Parsing text/part0002.html ...
Parsing text/part0007.html ...
Parsing text/part0006.html ...
Parsing text/part0019.html ...
Parsing text/part0008.html ...
Parsing text/part0009.html ...
Parsing text/part0004.html ...
Parsing text/part0020_split_000.html ...
Parsing text/part0010.html ...
Parsing text/part0011.html ...
Parsing text/part0012.html ...
Parsing text/part0020_split_001.html ...
Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
Flattening CSS and remapping font sizes...
Source base font size is 12.00001pt
Removing fake margins...
Found 25 items of level: div_1
Found 9 items of level: div_3
Found 24 items of level: div_2
Found 19 items of level: div_4
Found 1 items of level: p_4
Found 19 items of level: p_5
Found 831 items of level: p_2
Found 836 items of level: p_3
Ignoring level p_4
Ignoring level div_3
Ignoring level p_5
Ignoring level div_4
div_1 left margin stats: Counter({u'': 19})
div_1 right margin stats: Counter({u'': 19})
div_2 left margin stats: Counter({u'': 18})
div_2 right margin stats: Counter({u'': 18})
p_2 left margin stats: Counter({u'0': 563, u'12px': 263, u'24px': 5})
p_2 right margin stats: Counter({u'0': 831})
p_3 left margin stats: Counter({u'0': 749, u'17px': 87})
p_3 right margin stats: Counter({u'0': 836})
Cleaning up manifest...
Trimming unused files from manifest...
Trimming u'titlepage.xhtml' from manifest
Trimming u'cover.jpeg' from manifest
Creating PDF Output...
Converting input as a text based book...
Serializing oeb input to disk for processing...
The cover image has an id != "cover". Renaming to work around bug in Nook Color
Rendering pages to PDF...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0000.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0001.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0002.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0003.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0004.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0005.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0006.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0007.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0008.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0009.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0010.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0011.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0012.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0013.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0014.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0015.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0016.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0017.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0018.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0019.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0020_split_000.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0020_split_001.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0021.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0022.html...
Processing C:\Users\ADMIN\AppData\Local\Temp\calibre_s0jyon\z1zrxo_pdf_out\text\part0023.html...
Traceback (most recent call last):
  File "site-packages\calibre\ebooks\pdf\render\engine.py", line 140, in end
  File "site-packages\calibre\ebooks\pdf\render\serialize.py", line 499, in end
  File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 231, in embed_fonts
  File "site-packages\calibre\ebooks\pdf\render\fonts.py", line 160, in embed
  File "site-packages\calibre\utils\fonts\sfnt\subset.py", line 93, in pdf_subset
  File "site-packages\calibre\utils\fonts\sfnt\subset.py", line 51, in subset_truetype
NoGlyphs: This font has no glyphs for the specified character set, subsetting it is pointless

Python function terminated unexpectedly
  PDF Output failed, see log for details (Error Code: 1)
Traceback (most recent call last):
  File "site.py", line 132, in main
  File "site.py", line 109, in run_entry_point
  File "site-packages\calibre\utils\ipc\worker.py", line 189, in main
  File "site-packages\calibre\gui2\convert\gui_conversion.py", line 31, in gui_convert_override
  File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
  File "site-packages\calibre\ebooks\conversion\plumber.py", line 1177, in run
  File "site-packages\calibre\ebooks\conversion\plugins\pdf_output.py", line 133, in convert
  File "site-packages\calibre\ebooks\conversion\plugins\pdf_output.py", line 256, in convert_text
  File "site-packages\calibre\ebooks\conversion\plugins\pdf_output.py", line 282, in write
  File "site-packages\calibre\ebooks\pdf\render\from_html.py", line 239, in dump
Exception: PDF Output failed, see log for details

P. Alevantis (panagiotis-g) wrote :
information type: Public → Private Security
information type: Private Security → Public

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

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers