![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2020
Device: Pocketbook Aqua 2
|
EPUB to PDF - force image to be fit within single page
I normally prefer to convert my japanese books to pdf (allows me to force particular text orientation despite the device and handles furigana better)
But I encountered some issue with relatively big images being split across two pages, which I really don't like as it kinda ruins illustrations. Sadly I do not see any option that would help to control how images are placed in pdf or at least forced to stay within single page. So I hope maybe someone here have advise? Thank you. P.s. with epub my reader renders these images just fine without breaking anything (they are contained within single page) |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use something like:
img { max-height: 95vh !important} in the extra css section of the conversion dialog. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2020
Device: Pocketbook Aqua 2
|
Quote:
I unzipped original epub to check dimensions and it is 1443x2048 and I have feeling when it renders onto pdf it just splits based on these dimensions ![]() Probably in worst case I can just manually edit these epubs... |
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
what happens when you try it?
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2020
Device: Pocketbook Aqua 2
|
Regardless of how I change max-height the image is rendered in the same way as it was originally.
I even tried to set it to simply 40%, but visually it looks the same size (still broke onto two pages) |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
what happens if you use 200px and what exactly are you putting in extra css?
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Sep 2020
Device: Pocketbook Aqua 2
|
Hm interestingly enough setting precise px value makes image smaller.
I'll probably have to adjust it for every book. Probably smaller `vh` would work too, but I'm actually not sure what is viewport size in case of calibre. Anyway, thanks. |
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no viewport size, conversion to PDF happens via chromium's print to pdf feature. so the viewport is the page, and 95vh should work, no idea why it doesnt, you might need to add display:block to it as well.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
EPUB to HTLM (single page) | obihal | Conversion | 8 | 05-20-2014 01:45 PM |
Images fit page as mobi, but not ePub | Mat Ward | ePub | 2 | 12-19-2012 11:48 PM |
converting epub to pdf: can't get the front page image in | Nicoo | Calibre | 3 | 12-05-2009 08:18 AM |
Any way to force page breaks when converting HTML to EPUB | Bierkonig | Calibre | 23 | 10-31-2009 01:51 PM |
PDF Fit Visible per page/landscape view | jessesn | Sony Reader | 4 | 10-02-2006 10:42 AM |