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 10-24-2019, 08:02 AM   #1
jeffmcneill
Junior Member
jeffmcneill began at the beginning.
 
jeffmcneill's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2011
Device: Kindle Paperwhite
Epub to PDF: 5"x8" output

Hello folks,

I am trying to do an Epub to PDF, so that it is viable for print-on-demand. I just can't figure out how to specify the output as being 5"x8" with 1.5cm margins (480 x 768px content).

I'm confused with the input and output device selections, since the epub was not produced specifically for a given device (but does work precisely on Kindle paperwhite, my own test device). The output won't be for a device, per se, but be used as the PDF to create a print edition of the ebook.

Any thoughts on what settings to use to approximate the dimensions desired, are greatly appreciated.
jeffmcneill is offline   Reply With Quote
Old 10-24-2019, 10:31 AM   #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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Look under the PDF Output section of the conversion dialog
kovidgoyal is offline   Reply With Quote
Old 10-24-2019, 07:44 PM   #3
jeffmcneill
Junior Member
jeffmcneill began at the beginning.
 
jeffmcneill's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2011
Device: Kindle Paperwhite
Line spacing, how to modify?

Quote:
Originally Posted by kovidgoyal View Post
Look under the PDF Output section of the conversion dialog
I've been using the command line options, and have things mostly how I need them. Is it possible to modify line spacing (within paragraphs/lists)? I don't see an option that.
jeffmcneill is offline   Reply With Quote
Old 10-24-2019, 10:20 PM   #4
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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
--extra-css
kovidgoyal is offline   Reply With Quote
Old 10-25-2019, 12:09 AM   #5
jeffmcneill
Junior Member
jeffmcneill began at the beginning.
 
jeffmcneill's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2011
Device: Kindle Paperwhite
Fantastic. Works great. I've just tweaked the css in the ebook, but for some reason it doesn't properly execute the line-height command, so the external --extra-css body{line-height:1.0} did the job.

Here are the full options I used from the command line:

ebook-convert test.epub test.pdf --custom-size 5x8 --pdf-hyphenate --pdf-page-numbers --pdf-serif-family "Linux Libertine" --pdf-page-margin-bottom 50 --pdf-page-margin-top 35 --pdf-page-margin-left 41 --pdf-page-margin-right 41 --pdf-default-font-size 17 --extra-css body{line-height:1.0}

Inside the epub css, I added: {letter-spacing:-0.008em; word-spacing:-0.016em;} to the body.
jeffmcneill is offline   Reply With Quote
Old 10-28-2019, 02:31 AM   #6
jeffmcneill
Junior Member
jeffmcneill began at the beginning.
 
jeffmcneill's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2011
Device: Kindle Paperwhite
I was able to combine the css as follows:

ebook-convert test.epub test.pdf --custom-size 5x8 --pdf-hyphenate --pdf-page-numbers --pdf-serif-family "Linux Libertine" --pdf-page-margin-bottom 50 --pdf-page-margin-top 35 --pdf-page-margin-left 41 --pdf-page-margin-right 41 --pdf-default-font-size 17 --extra-css "body{line-height:1.0;letter-spacing:-0.008em;word-spacing:-0.016em;}"
jeffmcneill is offline   Reply With Quote
Old 10-28-2019, 03:04 AM   #7
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: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

Thanks for providing your code (and to Calibre of course). I was able to produce quite a nice PDF with it (though it adds a useless "false" cover).

I am used to produce 9cm×12cm PDF for my Kindle Paperwhite 3 with Prince. The only drawback I can find with your solution would be to read the PDF using the so-so Kindle PDF viewer.

Koreader muPDF viewer, provided with Koreader provides a much better reader experience, but requires a jailbroken device. Nothing is perfect.

Also, as shown here, postprocessing the output with cpdf could reduce the size of the output file. I got 1.6MB with one instead of 2.5MB. Usually, the expected difference in size is about 10 to 20%. The other factor which could explain this size difference could be the size of the embedded font files but I am unable to prove it.

Last edited by roger64; 10-28-2019 at 03:45 AM.
roger64 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Closest output profile to Kobo Forma in "Convert Book" dialog is "Kobo Reader" but.. droopy Devices 6 10-13-2019 10:52 PM
Request: separate "Preferred output format" from "Save to Disk" format Katsunami Calibre 2 08-24-2014 11:23 AM
RSS download: "EPUB Output" problems in v1.2? enriquep Recipes 2 09-07-2013 10:58 PM
PDF to EPUB problems: double "L's" and lines deamonfruba Calibre 7 05-06-2013 03:12 AM
"Python function terminated unexpectedly" on ePub to PDF conversion zunga Conversion 10 03-17-2013 07:18 PM


All times are GMT -4. The time now is 05:59 PM.


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