|
|
#1 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: May 2012
Device: kindle
|
Converting Epub to PDF
-I need to convert some ebooks (mobi and/or epub) to pdf files. I've been using Calibre. But I'm not happy with the results. The fonts either come out gigantic or way to small, the margins are never adequatem, and I lose all the hyperlinks (this part may be inevitable). Does anyone have any advice? Ideally, I would want the book to look as close to what a print copy of it would theoretically look like. Most of these are academic books; they are far easier to read and mark up on my iPad as pdf files (using iAnnotate) than using either the Kindle app or iBooks. |
|
|
|
|
|
#2 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 371
Karma: 298951
Join Date: Nov 2009
Location: Romania
Device: iPod touch 2G (16 GB)
|
Adjust the margins, font size, etc., to your liking from Calibre's settings before exporting it as a PDF. Or alternatively, convert it as HTML, open it in Word (or similar) and export as PDF from there. The ePub-PDF process is much easier than PDF-ePub, trust me. Epub was developed as both an output and a source, as opposed to PDF that should always be considered a final destination.
__________________
The The Impotence of Proofreading LayoutPrep – a custom Word macro that preps your OCR content for styles Resources for identifying fonts Last edited by DSpider; 02-09-2013 at 03:28 PM. |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34,660
Karma: 14439052
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
|
Using Calibre, take the ePub, convert it to HTMLZ, unzip the contents, load into Word, fix as needed, print to PDF. Done!
__________________
|
|
|
|
|
|
#4 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,086
Karma: 416755
Join Date: Jan 2009
Device: KoboGlo
|
Quote:
http://www.mobileread.com/forums/sho...30#post2325330 and the script is somewhere in this thread http://www.mobileread.com/forums/sho...ght=Prince.xml Last edited by roger64; 02-09-2013 at 07:08 PM. |
|
|
|
|
|
|
#5 | |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,196
Karma: 2508097
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
Quote:
As Roger says, the script uses Prince, so it's capable of giving a very good-quality output, but it may need some tweaking in the CSS, depending on how the ePub is coded. The good news is you can do most of the tweaking without modifying the actual ePub. Last edited by Jellby; 02-10-2013 at 03:18 AM. |
|
|
|
|
|
|
#6 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: May 2012
Device: kindle
|
Thanks! I'll try these.
On a related note, I bought an academic book in Kindle format (no choice here) which in print is a massive multi-columned collection of documents. I converted it from AZW3 to epub and then I compared the two on my iPad - in the Kindle app vs the iBooks app. I couldn't believe how much better it looked in the iBook application. Given that the formats are essentially the same in terms of how formatting works (text reflow, etc), I'm going with the assumption the Apple simply know how to make books like these more pleasing to look at than Amazon's Kindle app. |
|
|
|
|
|
#7 | |
|
Member
![]() Posts: 10
Karma: 10
Join Date: May 2012
Device: kindle
|
Quote:
I know this has something to do with Python, which I know next to nothing about, but I don't want to start installing a whole bunch of things I know little about for an app that may be no better than Calibre. So what is it exactly? And is it better than just messing around with Calibre? |
|
|
|
|
|
|
#8 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,196
Karma: 2508097
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
I don't know what calibre does, but this script simply uses Prince to generate the PDF, and offers a way to add ad-hoc CSS rules. You can install Prince and test it (just Prince) with some HTML files to see if you like what you can get. In principle, Prince offers a better line-breaking algorithm, and some useful CSS extensions (to get real floats, footnotes, generated content, etc.), and hyperlinks are retained. The script just extracts the HTML files from the ePub and passes them to Prince in a command line. You could do the same yourself without python.
If I had enough time and motivation I could probably turn this into a calibre plugin (calibre is python too), but wouldn't mind others doing that either. |
|
|
|
|
|
#9 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,086
Karma: 416755
Join Date: Jan 2009
Device: KoboGlo
|
Hi
I do not know Python. I have heard that on Linux, distros are going to upgrade Python from 2.7 to 3.3 (or maybe it has already been done for some of them). Will your script stop working for such a reason? Will it be necessary to update it? |
|
|
|
|
|
#10 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,196
Karma: 2508097
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
I don't know, I'm pretty much a python newbie... all I know is it works in my system, which still has python 2.7
Anyway, I expect the changes needed for python 3.3, if any, will be relatively straightforward, especially since the script does nothing really fancy.
|
|
|
|
|
|
#11 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,086
Karma: 416755
Join Date: Jan 2009
Device: KoboGlo
|
![]() I'd like to be such a python newbie... Well; 2.7 for me too. Wait and see. |
|
|
|
|
|
#12 | |
|
Member
![]() Posts: 10
Karma: 10
Join Date: May 2012
Device: kindle
|
Quote:
What's Prince exactly? |
|
|
|
|
|
|
#13 | |
|
Member
![]() Posts: 10
Karma: 10
Join Date: May 2012
Device: kindle
|
Quote:
Once I've unzipped the HTMLZ (using 7-Zip) how do I load it into word? If I just open the Index.html document, it does open, but the hyperlinks don't work. They take me to the top of the page. Whereas in a web browser they do work. So I must be doing something wrong. |
|
|
|
|
|
|
#14 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,196
Karma: 2508097
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
It is a program that generates PDFs from (x)HTML files (www.princexml.com), with better typesetting and more features than what you usually get from any "print to PDF" option around.
|
|
|
|
|
|
#15 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 56
Karma: 1110
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: Sony PRS-T1, iPad
|
7-Zip can open epubs directly (if they're not encrypted, but then it would be illegal anyway). Also, Openoffice Writer can import HTML-files (Insert --> File) with most, if not all formatting intact, and save as PDF (Word 2010 also have the ability to save to PDF, without the need to "print".
Just a couple of tricks to try out ... Regards, Kim |
|
|
|
![]() |
| Tags |
| conversion, epub conversion, formatting, kindle, pdf conversion |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Converting pdf into epub? | dorkmania | Workshop | 2 | 08-20-2011 09:02 AM |
| Converting From PDF to EPUB | aramzy | Conversion | 1 | 04-05-2011 10:10 PM |
| Converting PDF to Epub | nataliew | Sony Reader | 10 | 02-04-2011 01:53 AM |
| Converting from PDF to ePub | Adiman423 | Calibre | 9 | 11-24-2010 11:14 AM |
| Help with converting PDF to epub | neilmarr | Sigil | 6 | 11-14-2009 09:26 AM |