Hi,
first of all, I'm new to Prince, but I love it already. Thanks to the team for an awesome product.
However, there is one situation where Prince gives me worse results than browsers, which is a bit disappointing -- all the more that it does not seem to be a very "exotic" use case.
Consider a page with 3 paragraphs, and a floating (right) image between the 1st and 2nd paragraph (index.html). On the screen (see screen.png), the top of the floating image is vertically aligned with the top of the 2nd paragraph, which is normal. This is exactly what Prince does, but then if the floating image does not fit on the page, it moves it to the next page as well as the following paragraph, which is ugly (prince.pdf).
Browsers are a little smarter in this respect (see firefox.pdf and chrome.pdf): they move the floating element to the next page, but not the following paragraph, which avoids the huge white space that Prince is letting at the bottom of the first page.
I understand that the Prince developers may consider this as a feature rather than a bug, as the browsers is making an arbitrary decision that may not be the right one (I may prefer to have the image float to the top of the same page rather than the next one). However:
That being said, thanks again for a wonderful tool.
PS: note that I had to manually fiddle with margins with Chrome to get this result, but it does not change the fact that Chromes implements the same "smart" management of floating elements as Firefox.
first of all, I'm new to Prince, but I love it already. Thanks to the team for an awesome product.
However, there is one situation where Prince gives me worse results than browsers, which is a bit disappointing -- all the more that it does not seem to be a very "exotic" use case.
Consider a page with 3 paragraphs, and a floating (right) image between the 1st and 2nd paragraph (index.html). On the screen (see screen.png), the top of the floating image is vertically aligned with the top of the 2nd paragraph, which is normal. This is exactly what Prince does, but then if the floating image does not fit on the page, it moves it to the next page as well as the following paragraph, which is ugly (prince.pdf).
Browsers are a little smarter in this respect (see firefox.pdf and chrome.pdf): they move the floating element to the next page, but not the following paragraph, which avoids the huge white space that Prince is letting at the bottom of the first page.
I understand that the Prince developers may consider this as a feature rather than a bug, as the browsers is making an arbitrary decision that may not be the right one (I may prefer to have the image float to the top of the same page rather than the next one). However:
* even if this behaviour for float:right is considered correct, there should still be a (well documented) way to achieve the same result as browsers (I tried to fiddle with Prince-specific values of the float attribute, without success);
* I still think it would be better to align with browser's behaviours -- but this is your call.
That being said, thanks again for a wonderful tool.
PS: note that I had to manually fiddle with margins with Chrome to get this result, but it does not change the fact that Chromes implements the same "smart" management of floating elements as Firefox.