Order it now! Amazon prioritizes orders on a first come, first served basis.


View Full Version : HTML2LRF and inline pictures


pepak
11-25-2008, 01:45 PM
I wonder: How exactly does HTML2LRF decide what to do with pictures? I have a book where there is a paragraph with several inline pictures (running as a part of the text). All images are done with exactly the same HTML code (except for a different SRC and ALT, obviously), yet HTML2LRF treats some as inline and others as block (breaking the paragraph before and after).

kovidgoyal
11-25-2008, 01:55 PM
It's based on image size relative to page size

pepak
11-25-2008, 02:01 PM
Can I somehow force HTML2LRF to keep some images (identified by ID, CLASS, whatever) inline? Even ALL images would be fine if it was an option, e.g. --keep-all-images-inline - after all, I can always change images to blocks if I need to by putting them inside DIV or P tags.

kovidgoyal
11-25-2008, 02:23 PM
At the moment there isn't.

pepak
11-26-2008, 02:23 AM
"At the moment"? Dare I hope for this function in future versions? :-)

kovidgoyal
11-26-2008, 03:23 AM
why dont you just switch to epub output?

pepak
11-26-2008, 04:32 AM
Because EPUB is slower to display than LRF, the intra-document links are extremely slow compared to intra-document links in LRF and the text is not justified on my PRS-505.

It makes no difference to me which format is "more readable" or "more compatible" since I keep the original files in pure HTML and batch-convert them as needed - so if a better support for EPUB comes out in future firmware, I will simply run one command ang get all my books converted to the new format. But at the moment, LRF is simply better.

Phonella
01-21-2009, 09:48 PM
Hi, I'm having the same problem with inline images as Pepak.

Won't you please consider giving us more control over image placement with lrf?

If that's not possible could you please tell me the image dimensions that will cause a page break? I have an image that fills less than 1/2 of the page and yet it still causes a new page. I really want it to stay inline.

kovidgoyal
01-21-2009, 10:22 PM
Page break only happens if the image is > 375 pixels in height. If you're seeing a page break for a small image, it's happening for some other reason

Phonella
01-21-2009, 10:30 PM
Thanks for that information! It would be nice to have a little more control though, sometimes several lines of text could easily follow that size of image.

Btw my image was 400px in height.

Phonella
01-30-2009, 05:50 PM
Hi again,

I have an image that is 463 x 136 pixels and no matter what I do I cannot get it to center horizontally. I have smaller pixel width images and they center just fine -- is there a magic pixel width to get an image to center?

PS. Have tried CSS img {text-align: center; }, div=align center and using an inline style on the img tag (as in your demo): style= "text align: center" but nothing seems to be able to center this image.

Phonella
01-30-2009, 07:49 PM
Hi again,

I have an image that is 463 x 136 pixels and no matter what I do I cannot get it to center horizontally. I have smaller pixel width images and they center just fine -- is there a magic pixel width to get an image to center?

PS. Have tried CSS img {text-align: center; }, div=align center and using an inline style on the img tag (as in your demo): style= "text align: center" but nothing seems to be able to center this image.

After some testing it appears that the "magic number" for centering an image of a small height (136px) is 450px. 450px centers nicely; 451px is pushed over to the left side (as is the original 463px).

JSWolf
02-04-2009, 12:12 PM
bump!