03-14-2011, 04:56 PM | #1 |
Fanatic
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
|
error in converting pdf
Tried to convert a pdf file (that opens ok in Acrobat 9) with Calibre but encountered errors. So I downloaded the pdftohtml, ran it, and received the following errors:
can't find trailer dictionary can't find xref table. Is there anything I can to to successfully convert this file? |
03-14-2011, 06:26 PM | #2 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Have you read the sticky post yet? |
|
Advert | |
|
03-14-2011, 11:51 PM | #3 |
Fanatic
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
|
The error details from Calibre were pretty long, but here they are:
calibre, version 0.7.45 ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (xxxx) Convert book 1 of 1 (xxxxx) Resolved conversion options calibre version: 0.7.45 {'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|prologue|epilogue\\s+', 'i')) or @class = 'chapter']", 'chapter_mark': u'pagebreak', 'comments': None, 'cover': 'c:\\docume~1\\robert~1\\locals~1\\temp\\calibre_0 .7.45_tmp_cd4sxs\\calibre_0.7.45_hqe9wj.jpeg', 'debug_pipeline': None, 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'enable_heuristics': False, 'extra_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 0x044FE6F0>, 'insert_blank_line': False, '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, 'new_pdf_engine': False, 'no_chapters_in_toc': False, 'no_images': False, 'no_inline_navbars': False, 'output_profile': <calibre.customize.profiles.OutputProfile object at 0x044FE8D0>, 'page_breaks_before': u"//*[name()='h1' or name()='h2']", 'prefer_metadata_cover': False, 'pretty_print': False, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': 'c:\\docume~1\\robert~1\\locals~1\\temp\\calibre_0 .7.45_tmp_cd4sxs\\calibre_0.7.45_rsfddt.opf', 'remove_first_image': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'renumber_headings': True, 'replace_scene_breaks': u'', '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, 'tags': None, 'timestamp': None, 'title': None, 'title_sort': None, 'toc_filter': None, 'toc_threshold': 6, 'unwrap_factor': 0.45, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} InputFormatPlugin: PDF Input running on C:\Documents and Settings\Robert Cody\Documents 11-2010\My Documents\Calibre Library\Jack Chalker\Quintara Marathon 03. Ninety Trillion Fa (21)\Quintara Marathon 03. Ninety Trillion Fa - Jack Chalker.pdf Converting file to html... Python function terminated unexpectedly (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 110, 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 904, in run File "site-packages\calibre\customize\conversion.py", line 204, in __call__ File "site-packages\calibre\ebooks\pdf\input.py", line 50, in convert File "site-packages\calibre\ebooks\pdf\pdftohtml.py", line 72, in pdftohtml calibre.ebooks.ConversionError |
03-14-2011, 11:56 PM | #4 |
Fanatic
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
|
On second thoughts, I think there might be a way around the problem because the pdf file is in other formats, such as .txt or .html that should be better for conversion.
Bob |
03-14-2011, 11:56 PM | #5 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Calibre also uses pdftohtml, so it's unsurprising it choked. Best bet is to find something not based on pdftohtml - that excludes most if not all open source projects.
You could try Mobipocket creator or Acrobat Pro. Any alternate format will always be better than pdf (assuming it wasn't sourced from the pdf). |
Advert | |
|
03-15-2011, 04:39 AM | #6 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
If I were you, I'd have a go with the HTML format you have. That should produce better results.
|
03-17-2011, 12:53 AM | #7 |
Fanatic
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
|
Thanks for the info. I finally used acrobat 9 to convert it to rtf, but the resulting document was really totally useless! All the line breaks had vanished except for those originally with two blank lines between text at new chapters, so each mega-paragraph was composed or numerous run-together original book paragraphs. Impossible to decipher without having having the paper book copy.
|
03-17-2011, 01:14 PM | #8 |
Fanatic
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
|
Idolse,
I tried Mobi Creator with the pdf, and it produced a very usable result - all the paragraphs were maintained unlike my effort with Adobe Acrobat 9. Once in prc form, conversion to other formats was easy with Calibre. Thanks for the info about Creator; I never even thought about using a two stage conversion. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error when converting | pox | Conversion | 3 | 01-29-2011 12:14 PM |
Error converting RTF files | organicveggie | Calibre | 4 | 08-09-2010 03:20 AM |
Not converting, Fontconfig error | edgley | Calibre | 5 | 06-27-2010 10:57 PM |
Error converting to PDF from EPub and PRC | gauravj | Calibre | 3 | 05-24-2010 02:07 AM |
Error converting cbr files | ashadocat | Calibre | 5 | 12-21-2008 06:16 PM |