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

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 02-09-2013, 01:02 PM   #1
shmendrapolk
Member
shmendrapolk began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2012
Device: kindle
Converting Epub to PDF

There are numerous trheads about going from pdf to e-reader formats, but I'm having trouble going the other way:
-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.
shmendrapolk is offline   Reply With Quote
Old 02-09-2013, 03:25 PM   #2
DSpider
Evangelist
DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.
 
DSpider's Avatar
 
Posts: 406
Karma: 326969
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.

Last edited by DSpider; 02-09-2013 at 03:28 PM.
DSpider is offline   Reply With Quote
 
Enthusiast
Old 02-09-2013, 05:25 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,622
Karma: 17734032
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!
JSWolf is offline   Reply With Quote
Old 02-09-2013, 07:04 PM   #4
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 1,418
Karma: 846401
Join Date: Jan 2009
Device: KoboGlo
Quote:
Originally Posted by shmendrapolk View Post

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.
You may have a look to an example here. There are two PDF (different sizes), coming from the same source EPUB (with link to this one for comparison). It's made using Prince and a Jellby's script to convert EPUB to PDF.
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.
roger64 is offline   Reply With Quote
Old 02-10-2013, 03:16 AM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,075
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by roger64 View Post
and the script is somewhere in this thread
http://www.mobileread.com/forums/sho...ght=Prince.xml
The latest version (and hopefully cross-platform) is in this thread. It's also easy to find in the sticky thread titled "ePub tools and reading software submitted here".

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.
Jellby is offline   Reply With Quote
Old 02-11-2013, 06:46 AM   #6
shmendrapolk
Member
shmendrapolk began at the beginning.
 
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.
shmendrapolk is offline   Reply With Quote
Old 02-11-2013, 07:38 AM   #7
shmendrapolk
Member
shmendrapolk began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2012
Device: kindle
Quote:
Originally Posted by Jellby View Post
The latest version (and hopefully cross-platform) is in this thread. It's also easy to find in the sticky thread titled "ePub tools and reading software submitted here".

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.
OK I downloaded this. But it seems to require the installation of PyQt, which in turn requires the installation of something else.
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?
shmendrapolk is offline   Reply With Quote
Old 02-11-2013, 09:26 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,075
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
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.
Jellby is offline   Reply With Quote
Old 02-12-2013, 08:00 AM   #9
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 1,418
Karma: 846401
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?
roger64 is offline   Reply With Quote
Old 02-12-2013, 11:18 AM   #10
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,075
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
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.
Jellby is offline   Reply With Quote
Old 02-12-2013, 06:45 PM   #11
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 1,418
Karma: 846401
Join Date: Jan 2009
Device: KoboGlo


I'd like to be such a python newbie... Well; 2.7 for me too. Wait and see.
roger64 is offline   Reply With Quote
Old 02-12-2013, 07:28 PM   #12
shmendrapolk
Member
shmendrapolk began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2012
Device: kindle
Quote:
Originally Posted by Jellby View Post
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.
Calibre has some CSS related options. Problem is I don't know what the hell I'm doing.
What's Prince exactly?
shmendrapolk is offline   Reply With Quote
Old 02-12-2013, 07:37 PM   #13
shmendrapolk
Member
shmendrapolk began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2012
Device: kindle
Quote:
Originally Posted by JSWolf View Post
Using Calibre, take the ePub, convert it to HTMLZ, unzip the contents, load into Word, fix as needed, print to PDF. Done!
I'm trying this method now.
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.
shmendrapolk is offline   Reply With Quote
Old 02-13-2013, 04:33 AM   #14
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,075
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by shmendrapolk View Post
What's Prince exactly?
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.
Jellby is offline   Reply With Quote
Old 02-13-2013, 12:22 PM   #15
elibrarian
Connoisseur
elibrarian never is beset by a damp, drizzly November in his or her soul.elibrarian never is beset by a damp, drizzly November in his or her soul.elibrarian never is beset by a damp, drizzly November in his or her soul.elibrarian never is beset by a damp, drizzly November in his or her soul.elibrarian never is beset by a damp, drizzly November in his or her soul.elibrarian never is beset by a damp, drizzly November in his or her soul.elibrarian never is beset by a damp, drizzly November in his or her soul.elibrarian never is beset by a damp, drizzly November in his or her soul.elibrarian never is beset by a damp, drizzly November in his or her soul.elibrarian never is beset by a damp, drizzly November in his or her soul.elibrarian never is beset by a damp, drizzly November in his or her soul.
 
elibrarian's Avatar
 
Posts: 97
Karma: 59964
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
elibrarian is offline   Reply With Quote
Reply

Tags
conversion, epub conversion, formatting, kindle, pdf conversion

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 07:27 AM.


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