Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-03-2012, 04:02 PM   #31
Analoggab
Member
Analoggab began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Dec 2011
Device: Sony T1
Quote:
Originally Posted by jackie_w View Post
Yes, a direct zip-->epub calibre conversion works for me. No interim mobi required. If you can't make it work, if you like you can send me a PM with a link to your manually-created html file and we'll take it from there.
Using the html file you linked in the thread doesn't work going to epub directly. So something is going on there... Probably in the Calibre's epub conversion settings since using the same file it works for you.

I haven't tested XPDF yet. Will report on that later.
Analoggab is offline   Reply With Quote
Old 07-03-2012, 10:06 PM   #32
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Analoggab View Post
Using the html file you linked in the thread doesn't work going to epub directly. So something is going on there... Probably in the Calibre's epub conversion settings since using the same file it works for you.

I haven't tested XPDF yet. Will report on that later.
This is the Job detail log from my zip-->epub conversion. You could check the conversion settings at the top of the file to see if there are any obvious differences.
Spoiler:
Code:
Convert book 1 of 1 (Screenplay2)
Processing archive...
Resolved conversion options
calibre version: 0.8.55
{'asciiize': False,
 'author_sort': None,
 'authors': None,
 'base_font_size': 12.0,
 'book_producer': None,
 'breadth_first': False,
 'change_justification': u'justify',
 'chapter': u'/',
 'chapter_mark': u'pagebreak',
 'comments': None,
 'cover': None,
 'debug_pipeline': None,
 'dehyphenate': True,
 'delete_blank_paragraphs': True,
 'disable_font_rescaling': False,
 'dont_package': False,
 'dont_split_on_page_breaks': False,
 'duplicate_links_in_toc': False,
 'enable_heuristics': False,
 'epub_flatten': False,
 'extra_css': None,
 'extract_to': None,
 'filter_css': u'',
 'fix_indents': True,
 'flow_size': 260,
 'font_size_mapping': u'9, 10, 11, 12, 14, 16, 20, 36',
 'format_scene_breaks': True,
 'html_unwrap_factor': 0.4,
 'input_encoding': None,
 'input_profile': <calibre.customize.profiles.InputProfile object at 0x0344C610>,
 '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': 0.0,
 'margin_left': 5.0,
 'margin_right': 5.0,
 'margin_top': 10.0,
 'markup_chapter_headings': True,
 'max_levels': 5,
 'max_toc_links': 0,
 'minimum_line_height': 0.0,
 'no_chapters_in_toc': False,
 'no_default_epub_cover': True,
 'no_inline_navbars': False,
 'no_svg_cover': False,
 'output_profile': <calibre.customize.profiles.SonyReaderOutput object at 0x0344CAB0>,
 'page_breaks_before': u'/',
 'prefer_metadata_cover': False,
 'preserve_cover_aspect_ratio': False,
 'pretty_print': True,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': u'C:\\DOCUME~1\\JackieS\\LOCALS~1\\Temp\\calibre_0.8.55_tmp_4qwnkw\\wbrj5l.opf',
 'remove_fake_margins': False,
 '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': True,
 '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,
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
InputFormatPlugin: HTML Input running
on C:\DOCUME~1\JackieS\LOCALS~1\Temp\calibre_0.8.55_tmp_4qwnkw\x2k8sj_plumber_archive\content.opf
Parsing all content...
Manifest item 'toc.ncx' not found
Parsing screenplay.htm ...
Generating default TOC from spine...
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 0 entries.
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Cleaning up manifest...
Trimming unused files from manifest...
Creating EPUB Output...
Splitting markup on page breaks and flow limits, if any...
	Looking for large trees in screenplay.htm...
	No large trees found
This EPUB file has no Table of Contents. Creating a default TOC
EPUB output written to C:\DOCUME~1\JackieS\LOCALS~1\Temp\calibre_0.8.55_tmp_4qwnkw\v0xv35.epub
jackie_w is offline   Reply With Quote
Advert
Old 07-05-2012, 03:03 PM   #33
Analoggab
Member
Analoggab began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Dec 2011
Device: Sony T1
All right,

And here's my job.

These lines in mine were different vs. yours.

'font_size_mapping'
'base_font_size': 0.0,
'change_justification': u'original',
'margin_bottom': 5.0,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'smarten_punctuation': False,

These lines I didn't have compared to yours.
'html_unwrap_factor': 0.4,
'extra_css': None,

html >*epub
Spoiler:
Convert book 1 of 1 (Screenplay)
Processing archive...
Resolved conversion options
calibre version: 0.8.24
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'breadth_first': False,
'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': None,
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_package': False,
'dont_split_on_page_breaks': False,
'duplicate_links_in_toc': False,
'enable_heuristics': False,
'epub_flatten': False,
'extra_css': None,
'extract_to': None,
'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 0x109197b50>,
'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_levels': 5,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'no_chapters_in_toc': False,
'no_default_epub_cover': False,
'no_inline_navbars': False,
'no_svg_cover': False,
'output_profile': <calibre.customize.profiles.OutputProfile object at 0x109197f10>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'prefer_metadata_cover': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': '/var/folders/bg/ss9mm5m568d851by92yp2cz40000gp/T/calibre_0.8.24_tmp_wDUoaN/QfZQjS.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'',
'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,
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: HTML Input running
on /var/folders/bg/ss9mm5m568d851by92yp2cz40000gp/T/calibre_0.8.24_tmp_wDUoaN/M0S4sr_plumber_archive/content.opf
Parsing all content...
Manifest item 'toc.ncx' not found
Parsing KB_screenplay.html ...
Generating default TOC from spine...
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 0 entries.
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Parsing stylesheet.css ...
Cleaning up manifest...
Trimming unused files from manifest...
Creating EPUB Output...
Looking for large trees in KB_screenplay.html...
No large trees found
Generating default cover
This EPUB file has no Table of Contents. Creating a default TOC
EPUB output written to /var/folders/bg/ss9mm5m568d851by92yp2cz40000gp/T/calibre_0.8.24_tmp_wDUoaN/r_11nd.epub


Here's the html >*mobi which worked.
identical settings to the epub which doesn't work, expect one. (pretty_print)

Weird right?

Spoiler:
Convert book 1 of 1 (Screenplay)
Processing archive...
Resolved conversion options
calibre version: 0.8.24
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'breadth_first': False,
'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': None,
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_compress': False,
'dont_package': False,
'duplicate_links_in_toc': False,
'enable_heuristics': False,
'extra_css': None,
'extract_to': 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 0x109a81a90>,
'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_levels': 5,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'mobi_ignore_margins': False,
'mobi_toc_at_start': False,
'no_chapters_in_toc': False,
'no_inline_navbars': False,
'no_inline_toc': False,
'output_profile': <calibre.customize.profiles.OutputProfile object at 0x109a81e50>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'personal_doc': u'[PDOC]',
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': '/var/folders/bg/ss9mm5m568d851by92yp2cz40000gp/T/calibre_0.8.24_tmp_wDUoaN/Sp4M83.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'',
'rescale_images': False,
'series': None,
'series_index': None,
'share_not_sync': False,
'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,
'toc_title': None,
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: HTML Input running
on /var/folders/bg/ss9mm5m568d851by92yp2cz40000gp/T/calibre_0.8.24_tmp_wDUoaN/Ax2qkp_plumber_archive/content.opf
Parsing all content...
Manifest item 'toc.ncx' not found
Parsing KB_screenplay.html ...
Generating default TOC from spine...
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 0 entries.
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Parsing stylesheet.css ...
Cleaning up manifest...
Trimming unused files from manifest...
Creating MOBI Output...
Applying case-transforming CSS...
Parsing manglecase.css ...
Rasterizing SVG images...
Converting XHTML to Mobipocket markup...
Serializing images...
Serializing markup content...
Compressing markup content...
No TOC, MOBI index not generated
MOBI output written to /var/folders/bg/ss9mm5m568d851by92yp2cz40000gp/T/calibre_0.8.24_tmp_wDUoaN/HrdA0j.mobi

Analoggab is offline   Reply With Quote
Old 07-05-2012, 03:08 PM   #34
Analoggab
Member
Analoggab began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Dec 2011
Device: Sony T1
Also see here.

An image of the html to mobi.
As it should the Calibre reader doesn't change the formatting. If zoomed too big, words are cut.




And here's html to eub. See how the Reader can change the formatting and reorganize the words.
Analoggab is offline   Reply With Quote
Old 07-05-2012, 04:27 PM   #35
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Is the epub image a screenshot of the epub whilst on the PRST1? If so, what happens if you reduce the font-size using the buttons on the PRST1 and view the epub in landscape orientation, rather than portrait?

It looks to me as if all that is wrong is that the font-size is too big for each line to fit and the PRST1 is wrapping the overflow rather than letting it run off the right-hand edge. This is actually a good thing as I'm not sure that earlier Sony models were able to wrap <pre> text. (Just checked my PRS650, this model can also wrap <pre> text, perhaps it was the PRS505 which couldn't?)

I'll add a couple of PRST1 screenshot images shortly to illustrate my point. Photography is definitely not my strong suit

I don't think there's anything wrong with your calibre conversion settings. Having thought about it a bit more, having 'Smarten punctuation' UNCHECKED and 'Text justification' set to 'Left align' (or 'original') are probably a good idea for this type of file.

[Edit:] The following screenshots are taken from the same epub on the PRST1
  • 1st: landscape orientation, best font-size, no line wrapping
  • 2nd: landscape orientation, font-size too big, results in long <pre> lines wrapping
Attached Thumbnails
Click image for larger version

Name:	nowrap.jpg
Views:	233
Size:	76.3 KB
ID:	88753   Click image for larger version

Name:	wrapped.jpg
Views:	244
Size:	76.1 KB
ID:	88754  

Last edited by jackie_w; 07-05-2012 at 07:01 PM. Reason: images added
jackie_w is offline   Reply With Quote
Advert
Old 07-05-2012, 06:38 PM   #36
Analoggab
Member
Analoggab began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Dec 2011
Device: Sony T1
This is taken from the ebook viewer in Calibre. Not from the Sony.
When I did my testing, I realized I could simply open the epub or mobi file in that viewer and if the file was cropped (does not adjust formatting) as it is with the Mobi file, then it would work well in the T1.

When I put the epub file in the Sony, it's OK in landscape but some formatting is off.
==>*What is truly working is when I upload an epub converted from a Mobi file. It's perfect on the Sony. So it's possible, I just don't understand why it needs to convert to Mobi and then to epub on my side for it to work.
Analoggab is offline   Reply With Quote
Old 07-05-2012, 06:38 PM   #37
Analoggab
Member
Analoggab began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Dec 2011
Device: Sony T1
Subject 2:

Have you tried using XPDF ?
Here is my result

Analoggab is offline   Reply With Quote
Old 07-05-2012, 07:35 PM   #38
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Analoggab View Post
This is taken from the ebook viewer in Calibre. Not from the Sony.
When I did my testing, I realized I could simply open the epub or mobi file in that viewer and if the file was cropped (does not adjust formatting) as it is with the Mobi file, then it would work well in the T1.

When I put the epub file in the Sony, it's OK in landscape but some formatting is off.
==>*What is truly working is when I upload an epub converted from a Mobi file. It's perfect on the Sony. So it's possible, I just don't understand why it needs to convert to Mobi and then to epub on my side for it to work.
My answer remains the same, the calibre Viewer is wrapping the epub lines, just make the window wider until it stops wrapping.

However, you cannot use the calibre viewer to simulate what an epub, or mobi will look like on any particular reader. For a start the calibre viewer will convert a mobi (in memory) to epub before displaying.

I've now added my PRST1 images to my earlier post.

Regarding the XPDF pdftotext utility, here's a screencap of the output TXT file created on my Windows XP PC from kidblue's original sample screenplay PDF. Did you remember to add the -layout parameter in the commandline instruction?

I don't know what else to suggest. I don't know what is different in your setup to mine other than you have a Mac and I have a WinXP PC.

Can you post both your epubs:
- the one created by the zip-to-epub conversion
- the one where you went zip-to-epub-to-mobi.

I'll see if I can see a difference.
Attached Thumbnails
Click image for larger version

Name:	XPDF_pdftotext.jpg
Views:	236
Size:	89.8 KB
ID:	88756  

Last edited by jackie_w; 07-05-2012 at 07:37 PM.
jackie_w is offline   Reply With Quote
Old 07-05-2012, 07:42 PM   #39
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Also, perhaps you should update your calibre version. You appear to be using v0.8.24 which is 34 releases out-of-date.
jackie_w is offline   Reply With Quote
Old 07-09-2012, 03:58 PM   #40
Analoggab
Member
Analoggab began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Dec 2011
Device: Sony T1
Yes I updated Calibre after I had posted Calibre's job details.

I got XPDf from there. I downloaded xpdfbin-win-3.03.zip. Right stuff?
http://www.foolabs.com/xpdf/download.html
I need to do more testing. I think I did it wrong.


Quote:
Originally Posted by jackie_w View Post
However, you cannot use the calibre viewer to simulate what an epub, or mobi will look like on any particular reader.
I wasn't trying to simulate how it would look on a reader but simply to see if the "retain layout" command worked in the conversion. Since the viewer can adjust the layout/formatting of the epub, it will mean it will adjust it on a reader. Compared to the mobi where it cannot. (as well as epub converted from mobi)

Here are the 2 files requested.
- the one created by the zip-to-epub conversion
- the one where you went zip-to-epub-to-mobi.
Attached Files
File Type: epub Screenplay - zip to epub.epub (140.3 KB, 189 views)
File Type: epub Screenplay - zip to mobi to epub.epub (141.1 KB, 216 views)
Analoggab is offline   Reply With Quote
Old 07-12-2012, 03:18 PM   #41
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
I've copied your zip-to-epub version to my PRST1. It displays just as well as my own, i.e. nothing wrong with it.

It's not surprising that your 2 epubs display slightly differently because the mobi-to-epub conversion has changed the markup in the epub's html file.

The zip-to-epub contains a single pair of <pre>...</pre> tags with the formatted TXT file in-between - very little change from the html file you imported into calibre.

The zip-to-mobi-to-epub has no <pre> tags but instead a single <p><tt>...</tt></p> paragraph with a hard linebreak (<br />) at the end of every line of text.

The biggest difference I see between your version and mine is:
  • on page 1, the title page, where the order of the 2 blocks of text are reversed.
  • the content page numbers are also positioned differently. On mine the page no. is on the right of the line, on yours it's on the left of the line
Neither appear to affect the readability of the epub.

I'm guessing it's due to longer lines wrapping onto 2 lines when creating the initial TXT from PDF in XPDF pdftotext. I see the current version of XPDF is 3.03 whereas my copy is 3.02. I don't know whether this accounts for the slight difference, or whether it's something to do with Mac vs Windows. You could try reading the pdftotext documentation to see if changing the runtime parameters gets you a better output file. In particular, it's worth considering the -htmlmeta option (as well as the -layout option) which, at a glance, seems to combine the following steps into a single step:
  • create the TXT file
  • wrap an html header/footer around it, including the <pre>...</pre> tags
  • output the html file to disk
Code:
"C:\Program Files\XPDF\pdftotext.exe" -layout -nopgbrk -htmlmeta screenplay.pdf screenplay.html
Whichever method you use, you need to compare the XPDF output with the original pdf, to make sure you have created a good source, before complicating things by doing an epub conversion.
jackie_w is offline   Reply With Quote
Old 07-20-2012, 03:19 PM   #42
Analoggab
Member
Analoggab began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Dec 2011
Device: Sony T1
Thank you so much for your precious contribution Jackie.
I have a very workable solution right now. Couldn't have done without you.

I hope others will benefit from your input.

Analoggab is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
kindle 2: hightlighting text in a pdf? venkat3 Amazon Kindle 4 09-13-2012 07:49 PM
Sony or kindle for text based PDFs? paulpod Which one should I buy? 1 10-12-2010 11:11 AM
HTML to MOBI text format is off when I get it on Kindle cloudyvisions Calibre 5 07-14-2010 12:42 AM
will kindle text 2 speech work on any .mobi books? neoromance Kindle Formats 1 01-31-2010 06:12 PM
Cybook & text-based pdfs StephieP Bookeen 17 04-28-2008 11:50 AM


All times are GMT -4. The time now is 07:32 PM.


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