![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2022
Device: none
|
Converting HTML => PDF: text and image flow/whitespace issue
I am converting HTML to PDF using Calibre. I have a bunch of 2:3 aspect ratio (portrait mode) images in the book. Because my PDF is also 2:3 aspect ratio, the images almost always take a full page to themselves.
That isn't a problem in itself, but it creates a problem where there is often tons of white space on the page before the image. Often a page preceding an image might only have a few sentences or paragraphs before the image essentially creates a new page break. Is there a way Calibre can "reflow" the text that comes after the image so that it fills up the white space before it? For my application it's not critical that the image goes exactly where it is, it can move around a bit relative to the text to fix this issue. But I did not see any such options in the documentation. Thanks. ![]() |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There isn't any such option conversion basically uses the print to pdf function of chromium, so it's limited to the capabilities of css and html. As far as I know css has no such function.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2022
Device: none
|
Thanks for the quick response, Kovid. That's too bad, but it makes sense. I'll keep thinking about this problem.
I appreciate you and your hard work on Calibre (just sent a donation :-)) Have a good one.. Last edited by py_make_book; 05-28-2025 at 11:35 AM. Reason: unicode emojis apparently don't work |
![]() |
![]() |
![]() |
#4 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 317
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
image control
By using CSS you can make changes so that zero blank space appears before the full page image. If you reduce the size of the image, both width and height are reduced in proportion. Doing this now produces blank space to the right side of the image. However, by leaving a margin to the right of the image text that is normally after the image is now to the right of the image. This behaves well in ebook readers when you change view from one, two, or more columns. Many ebook reading programs let you tap on an image and the image will temporarily fill the screen. You can also set the image to float right instead of left. In this case the text will be to the left of the image.
|
![]() |
![]() |
![]() |
#5 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,814
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
However, style/formatting in a word processor for PDF works well. No need for InDesign or other expensive Adobe tools.
PDFs are electronic, but fixed layout and fixed page size target, not real ebooks. MS Word & LO Writer have been fine for a decade for doing this, unless it's very complicated, in which case the HTML & CSS route is crazy. |
![]() |
![]() |
Advert | |
|
![]() |
Tags |
fixed layout, html conversion, image & text, image aspect ratio, reflow |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free PDF converter from multi-column PDF to 'text flow'? | avid01 | 4 | 01-07-2014 08:17 AM | |
Pdf to html without losing text over image | MadTom | Conversion | 1 | 11-14-2013 09:41 AM |
Did you encounter a same problem about converting PDF to text/word/image | Ivymin | 3 | 11-29-2011 08:45 PM | |
HTML to EPUB Inline Text/Image Issue | HoushaSen | Conversion | 2 | 07-02-2011 08:03 PM |
PRS-350 Landscape mode text flow issue | skypilotpete | Sony Reader | 2 | 03-25-2011 03:35 AM |