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 05-28-2025, 10:52 AM   #1
py_make_book
Junior Member
py_make_book began at the beginning.
 
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.

py_make_book is offline   Reply With Quote
Old 05-28-2025, 10:55 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,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.
kovidgoyal is offline   Reply With Quote
Advert
Old 05-28-2025, 11:34 AM   #3
py_make_book
Junior Member
py_make_book began at the beginning.
 
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
py_make_book is offline   Reply With Quote
Old 05-29-2025, 10:51 AM   #4
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2025-05-29 09-43-23.jpg
Views:	17
Size:	363.5 KB
ID:	215920   Click image for larger version

Name:	Screenshot from 2025-05-29 09-44-49.png
Views:	15
Size:	848.9 KB
ID:	215921   Click image for larger version

Name:	Screenshot from 2025-05-29 09-45-12.png
Views:	19
Size:	977.6 KB
ID:	215922  
rjwse@aol.com is offline   Reply With Quote
Old 05-31-2025, 02:16 PM   #5
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
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.
Quoth is offline   Reply With Quote
Advert
Reply

Tags
fixed layout, html conversion, image & text, image aspect ratio, reflow


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free PDF converter from multi-column PDF to 'text flow'? avid01 PDF 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 PDF 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


All times are GMT -4. The time now is 11:02 PM.


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