Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-22-2012, 06:48 AM   #1
TripleD
Junior Member
TripleD began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2012
Device: none
Split text in EPub to PDF

Whenever I try to convert Epub to PDF the resulting PDF has no page margins. The text sometimes shows up correctly, but more often than not the bottom/top line of text is "split" horizontally across two pages.

I'm using calibre 0.8.48 on Mac, with Preview being used to examine the resulting PDFs. I've tried playing around with the conversion settings but the results are all the same. Any insight you can offer would be much appreciated.
TripleD is offline   Reply With Quote
Old 04-22-2012, 07:28 PM   #2
donB006
Enthusiast
donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.
 
Posts: 25
Karma: 186268
Join Date: Jun 2011
Device: Kindle k3G, DXG; Iriver Story HD
The reason the page gets split through text or images is because the Calibre converts the ebook to html an then uses the QPrinter widget from QT to print the book to a pdf file. The QPrinter always chops and splits the pages when making a pdf.
To avoid those annoying splits I have been converting the files to htmlz and then extracting the index.html and printing to a pdf using Firefox or xhtml2pdf. Others use Open Office to print from the epub. Let us know if you have a better way.
.
donB006 is offline   Reply With Quote
 
Advertisement
Old 04-24-2012, 03:56 PM   #3
icerabbit
Junior Member
icerabbit began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2012
Device: kindle ipad
I have been struggling with this very issue with any attempt I've made at converting things in Calibre.

This might circumvent splitting characters over two pages, but ...

How does one read an htmlz file ?
icerabbit is offline   Reply With Quote
Old 04-24-2012, 04:04 PM   #4
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,106
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by icerabbit View Post

How does one read an htmlz file ?
A htmlz is just a zipped HTML file where the whole book is eld as a single HTML file.
itimpi is offline   Reply With Quote
Old 04-24-2012, 04:29 PM   #5
icerabbit
Junior Member
icerabbit began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2012
Device: kindle ipad
Ok thanks. I've renamed the htmlz to zip. Extracted the index file.

One step closer.

Now when printing to PDF from the browser, it puts either the long file path on the bottom of every page or with other settings actually file name on top and time and day on the bottom ... as if I'm printing any page life off the internet ...

Mmmm Firefox page settings might do it ... crossing fingers.
icerabbit is offline   Reply With Quote
Old 04-25-2012, 10:57 PM   #6
donB006
Enthusiast
donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.
 
Posts: 25
Karma: 186268
Join Date: Jun 2011
Device: Kindle k3G, DXG; Iriver Story HD
You have probably figured this out already. In my Firefox when I click on print the dialog shows General, Page Setup and Options tabs. The General tab has the print to file and the pdf choice. The Page Setup shows the size of page to choose. The page size is an easy way to adjust the fonts if your reader automatically zooms to full page as mine does. the Options tab has the header and footer choices for the file name, time and day or the choice --blank-- that I use. The defaults can be modified permanently with the url about:config in the browser.
donB006 is offline   Reply With Quote
Old 05-08-2012, 10:32 PM   #7
donB006
Enthusiast
donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.donB006 can program the VCR without an owner's manual.
 
Posts: 25
Karma: 186268
Join Date: Jun 2011
Device: Kindle k3G, DXG; Iriver Story HD
I have found another way to convert to pdf. There is a program called wkhtmltopdf based on the same QPrinter widget used by Calibre except they have patched QT to prevent the splitting found in Calibre. This is what they say about this problem common with Calibre:

Quote:
Page Breaking

The current page breaking algorithm of WebKit leaves much to be desired. Basically webkit will render everything into one long page, and then cut it up into pages. This means that if you have two columns of text where one is vertically shifted by half a line. Then webkit will cut a line into pieces and display the top half on one page and the bottom half on another page. It will also break image in two and so on. If you are using the patched version of QT you can use the CSS page-break-inside property to remedy this somewhat. There is no easy solution to this problem, until this is solved try organising your HTML documents such that it contains many lines on which pages can be cut cleanly.
So they have a static version of wkhtmltopdf with the patches and I have tried that and the page breaks do not split the text. See wkhtmltopdf
.
donB006 is offline   Reply With Quote
Old 07-16-2012, 04:42 AM   #8
fullybook
Member
fullybook 's soul has travelled the oceans between the stars.fullybook 's soul has travelled the oceans between the stars.fullybook 's soul has travelled the oceans between the stars.fullybook 's soul has travelled the oceans between the stars.fullybook 's soul has travelled the oceans between the stars.fullybook 's soul has travelled the oceans between the stars.fullybook 's soul has travelled the oceans between the stars.fullybook 's soul has travelled the oceans between the stars.fullybook 's soul has travelled the oceans between the stars.fullybook 's soul has travelled the oceans between the stars.fullybook 's soul has travelled the oceans between the stars.
 
Posts: 10
Karma: 129362
Join Date: Jul 2012
Device: Samsung Galaxy Mega 5.8, Kobo Mini
Lightbulb

Quote:
Originally Posted by donB006 View Post
The reason the page gets split through text or images is because the Calibre converts the ebook to html an then uses the QPrinter widget from QT to print the book to a pdf file. The QPrinter always chops and splits the pages when making a pdf.
To avoid those annoying splits I have been converting the files to htmlz and then extracting the index.html and printing to a pdf using Firefox or xhtml2pdf. Others use Open Office to print from the epub. Let us know if you have a better way.
.
There's a better way. I convert EPUB to RTF. I open the RTF in Microsoft Word 2007, then click Save As > PDF. It even retains the formatting. No split texts.
fullybook is offline   Reply With Quote
Old 09-08-2012, 01:18 PM   #9
Cephas Atheos
Member
Cephas Atheos is on a distinguished road
 
Cephas Atheos's Avatar
 
Posts: 11
Karma: 50
Join Date: Sep 2012
Location: In the hills around Melbourne, Australia
Device: Kindle DX
So what's the best way of getting calibre to use either a patched version of QT, or a newer version, or a different tool?

I'm a little disappointed that such an all-in-one tool as good as calibre needs to rely on someone else's broken code, and forces us to do what we all did before we got calibre - use a plethora of other tools, with varying degrees of useability and reliability. Not to mention using Firefox or Word to convert hundreds (or indeed thousands) of files reliably to PDF! I'm not going to live that long, methinks!

Is it possible to download the QT tool and "insert" it into calibre's app structure as a workaround?
Cephas Atheos is offline   Reply With Quote
Old 09-08-2012, 01:20 PM   #10
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: 26,438
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This thread is out of date. calibre conversion to PDF has not had split text for a while. Simply update to a recent calibre release.
kovidgoyal is offline   Reply With Quote
Old 09-08-2012, 01:23 PM   #11
Cephas Atheos
Member
Cephas Atheos is on a distinguished road
 
Cephas Atheos's Avatar
 
Posts: 11
Karma: 50
Join Date: Sep 2012
Location: In the hills around Melbourne, Australia
Device: Kindle DX
I wish that were true! I'm using 0.8.68 and I'm seeing this exact problem on every PDF produced... Is there a newer version that doesn't have this problem? Or have I somehow corrupted the support files?
Cephas Atheos is offline   Reply With Quote
Old 09-08-2012, 01:47 PM   #12
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: 26,438
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I have no idea. This problem was fixed in 0.8.57 over two months ago.
kovidgoyal is offline   Reply With Quote
Old 09-08-2012, 01:53 PM   #13
Cephas Atheos
Member
Cephas Atheos is on a distinguished road
 
Cephas Atheos's Avatar
 
Posts: 11
Karma: 50
Join Date: Sep 2012
Location: In the hills around Melbourne, Australia
Device: Kindle DX
I see.

The only thing that I'm changing from the default settings when doing the conversion is to adjust the margins on the output to 25pt (instead of the default 5 pt). But while that results in far fewer splits, the results are not particularly pleasing to the eye.

Could it be that somehow I've managed to change the QT support file(s)? I don't know how I could have done it, unless a plugin could have modified the file? I have downloaded and installed (and then uninstalled) a number of plugins, but I was pretty careful to remove the plugin after I tried each one out.

Would reinstalling help fix the problem if there was a plugin that ate it's own brain?
Cephas Atheos is offline   Reply With Quote
Old 09-08-2012, 01:58 PM   #14
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: 26,438
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Rename your calibre config directory, uninstall and re-install. Make sure you aren't running from an obsolete source checkout of the calibre code. The number of ways you can screw up something as complex as calibre are infinite and not even countably so. And then of course you may well be trying to convert a non reflowable epub, or an epub with scanned images oftext instead of actual text. Who knows. This whole thing would be a lot easier if you follow the instructions in the sticky on how to ask conversion questions.
kovidgoyal is offline   Reply With Quote
Old 09-08-2012, 08:54 PM   #15
Cephas Atheos
Member
Cephas Atheos is on a distinguished road
 
Cephas Atheos's Avatar
 
Posts: 11
Karma: 50
Join Date: Sep 2012
Location: In the hills around Melbourne, Australia
Device: Kindle DX
Unhappy

Thanks, that fixed the problem.

Just FYI, I'm extremely new to the Mac world, so I just *assumed* that being a good citizen and downloading the latest version of calibre from the official product page wouldn't end up with me needing to know about SVN checkouts and unofficial builds.

The reason I didn't want to raise a new thread that was a duplicate of an existing thread that described my problem to a 'T' was to not provoke anyone into thinking I hadn't conducted a reasonable search for a previous resolution to my problem.

And, since there was NO mention of any update that fixed, addressed, or resolved this thread's original problem - which, by the way, is just over a month old, and not locked - I just *assumed* (there's that word again ) that, since I couldn't find any textual search results that indicated that this problem had been fixed anywhere else, it was still a valid issue.

I admit that I did not follow your (actually quite reasonable and thorough!) protocol for posting a problem description, but that was because a) this thread already existed, and I thought that since there was no other mention of the problem or solution, it was still an ongoing issue; and b) I didn't want to clutter up a post with examples that (for my unsuspecting mind) seemed to indicate that every attempt to produce a PDF resulted in the exact problem described here.

But mea maxima culpa, and I'm sorry to have frustrated you - I can understand that you must be very busy, and the last thing you want is to have a noob mac user raise an issue that you thought had been fixed a long time ago! Personally, I'd hit me with a brick, but that's probably not possible online.

Might I respectfully suggest that this problem (which appears to be related to a plugin overwriting the QT library thingy) be added to the FAQ? I don't _think_ this is really a corner case - like I said, I'm trying to do the right thing by downloading the correct installer, and using only proper plugins, but this might cause a similar problem down the track to other users who haven't learned the ins and outs of how Mac apps work 'under the hood' so to speak.

I'm a fairly experienced Windows programmer and ex-security expert (30+ years), so I was truly not trying to be clever or devious in using or working with calibre. I can absolutely appreciate the incredible amount of work, sweat, and intelligence that's gone into this amazing product, and I hope to keep using it to manage my 28k+ document library in the future. There's nothing else that comes close to what calibre does, and I really don't want to piss off the developer - but I think I managed to do that, even with the purest of intentions. ANd for that I apologise.
Cephas Atheos is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert text while converting PDF to EPUB DougAtHitplays Conversion 5 09-23-2011 12:52 PM
Pdf to ePub text problem billy1979 Conversion 6 07-29-2011 08:29 PM
PDF to Epub - Images with Text ebahm Calibre 2 09-19-2010 04:23 PM
can Calibre split text from multiple pdf pages? pjfan281 Calibre 4 07-25-2008 01:08 AM


All times are GMT -4. The time now is 08:56 PM.


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