Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-02-2011, 11:58 AM   #1
skallal
Junior Member
skallal began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2011
PDF to MOBI command line issues

This is my first post on this forum. I am using Calibre on a client's web site to to convert a PDF document to MOBI format on the fly. I have been able to do the conversion manually through the library with reasonable results. But I have NOT been able to do so with ebook-convert.exe wo/ some interesting formatting issues.

The only conversion defaults I've changed in the library are on the Conversion Input Options for PDF Input. Line Un-Wrapping factor is changed to 0.10 and No Images is checked.

The command line equivalents are:
--no-images
and
--html-unwrap-factor=0.10

Are these command line options correct?

The formatting issue is that the MOBI output has random paragraph breaks in the middle of some sentences. A look at the web inspector, in the viewer, shows HTML paragraph breaks (<p></p> tags) in the middle of these sentences. I've run ebook-convert.exe with the debug option. The HTML is OK in the debug "input" folder. But the HTML in the debug "parsed" folder is where the bad paragraph breaks begin.

I am new to Calibre, but it seems like the problem is in the input plug-in somewhere. Yet the problem does NOT exist within the library. So there is a problem in my usage of ebook-convert.exe.

Also I'd like to get the Calibre source code. I've download Bazaar, but am unable to retrieve the source code. Never used Bazaar before. Mainly code in C# ASP.NET, but hope to make sense of the Python code.

Also I tried to call pdftohtml.exe directly. It works except the encoding is off. I don't know how to use the -enc command line option to specify UTF8 encoding for example.

I am using version 0.7.45, which is almost the newest. And I am running Windows XP Pro SP3.

Can someone please help me?
skallal is offline   Reply With Quote
Old 03-02-2011, 12:55 PM   #2
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: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The correct option is --unwrap-factor
kovidgoyal is online now   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line convert ePub->MOBI mangles cover cscotts Calibre 7 12-14-2010 12:21 AM
command line mobi generation and covers DarkAbsynthe Calibre 2 10-29-2010 10:33 PM
Still having problems PDF to MOBI line unwrapping jengwen Calibre 2 04-16-2010 09:14 AM
Mobi Creator and the command line Ortep Kindle Formats 1 06-11-2009 09:00 AM
command line vs GUI (PDF->MOBI for K2) tlc Calibre 12 02-24-2009 06:20 PM


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


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