PDF transition fails - number of header/footer pages

Bug #2040074 reported by Justin Kirvan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

This bug was previously reported and fixed, but I am experiencing it now, about three years later. I'm running Calibre 6.29.0 on Windows 10. Here is the relevant bit of error log:

 File "site.py", line 50, in run_entry_point
  File "calibre\utils\ipc\worker.py", line 215, in main
  File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override
  File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
  File "calibre\ebooks\conversion\plumber.py", line 1281, in run
  File "calibre\ebooks\conversion\plugins\pdf_output.py", line 188, in convert
  File "calibre\ebooks\conversion\plugins\pdf_output.py", line 255, in convert_text
  File "calibre\ebooks\pdf\html_writer.py", line 1176, in convert
  File "calibre\ebooks\pdf\html_writer.py", line 1068, in add_header_footer
ValueError: The number of header/footers pages (508) != number of document pages (507)

Revision history for this message
Justin Kirvan (jkirvan) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote :

Post the *full* conversion log

Changed in calibre:
status: New → Incomplete
Revision history for this message
Justin Kirvan (jkirvan) wrote :
Download full text (19.0 KiB)

Here's the full log:
calibre, version 6.29.0 (win32, embedded-python: True)
Conversion error: Failed: Convert book 1 of 1 (Thinking, Fast and Slow)

Convert book 1 of 1 (Thinking, Fast and Slow)
DeDRM v7.2.1: Trying to decrypt 4teanzug.epub
DeDRM v7.2.1: Verifying zip archive integrity
DeDRM v7.2.1: “4teanzug.epub” is neither an Adobe Adept nor a Barnes & Noble encrypted ePub
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 187, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 644, in run
  File "calibre_plugins.dedrm.__init__", line 420, in ePubDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Couldn't decrypt after 0.6 seconds. DRM free perhaps?
Conversion options changed from defaults:
  embed_all_fonts: True
  cover: 'C:\\Users\\btm\\AppData\\Local\\Temp\\calibre_kne2n99q\\h367sjy9.jpeg'
  verbose: 2
  smarten_punctuation: True
  pdf_page_margin_bottom: 25.0
  pdf_page_margin_top: 65.0
  read_metadata_from_opf: 'C:\\Users\\btm\\AppData\\Local\\Temp\\calibre_kne2n99q\\1zzstxhn.opf'
  pdf_serif_family: 'Liberation Serif'
  extra_css: 'body { font-weight: bold }\np { text-indent: 2em; }\na:link {\n text-decoration: none ;\n}'
  change_justification: 'left'
  base_font_size: 12.0
  font_size_mapping: '5.0, 7.0, 9.0, 12.0, 13.5, 17.0, 20.0, 22.0, 24.0'
  pdf_mono_family: 'Courier New'
  pdf_page_margin_left: 50.0
  filter_css: ',margin-left,margin-bottom,margin,margin-top,margin-right,font-family'
  pdf_default_font_size: 18
  expand_css: True
  insert_blank_line: True
  pdf_page_margin_right: 60.0
  pdf_sans_family: 'Arial'
  embed_font_family: 'Liberation Serif'
  pdf_header_template: '<header style="justify-content: space-between; font-size: smaller">\n <div>_TITLE_</div>\n <div>_SECTION_</div>\n</header>'
Resolved conversion options
calibre version: 6.29.0
{'asciiize': False,
 'author_sort': None,
 'authors': None,
 'base_font_size': 12.0,
 'book_producer': None,
 'change_justification': 'left',
 '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': 'C:\\Users\\btm\\AppData\\Local\\Temp\\calibre_kne2n99q\\h367sjy9.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': True,
 'embed_font_family': 'Liberation Serif',
 'enable_heuristics': False,
 'expand_css': True,
 'extra_css': 'body { font-weight: bold }\n'
              'p { text-indent: 2em; }\n'
              'a:link {\n'
              ' text-decoration: none ;\n'
              '}',
 'filter_css': ',margin-left,margin-bottom,margin,margin-top,margin-right,font-family',
 'fix_indents': True,
 'font_size_mapping': '5.0, 7.0, 9.0, 12.0, 13.5, 17.0, 20.0, 22.0, 24.0',
 'format_scene_breaks': True,
 'html_unwrap_factor': 0.4,
 'input_encoding': None,
 'input_profile': <calibre.customize.profiles.InputProfile object at 0x0000022BFC1ECF70...

Revision history for this message
Kovid Goyal (kovid) wrote :

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.