Forum Samples, Tips and Tricks

Rounding Pixels

macki
Hi,

Is it possible to turn on rounding pixels in Prince e.g 0.8px to 1px?
The browsers use a such rounding (e.g Chrome).

<div style="position: absolute; top: 0px; left: 0px; background-color: red; width: 1px; height: 0.8px;"></div>

<div style="position: absolute; top: 0px; left: 1px; background-color: red; width: 1px; height: 1px;"></div>
mikeday
This is not currently possible, but perhaps we could add an option for it in the future.
macki
Thanks Mike for your prompt response!
mikeday
Actually it looks quite tricky, and browsers differ significantly in their behaviour.