![]() |
#1 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Look under the PDF Output section of the conversion dialog
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2011
Device: Kindle Paperwhite
|
Line spacing, how to modify?
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
--extra-css
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() 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;}" |
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |