Forum How do I...?

Fuzzy border rendering and radius

kdouangkeo
Hi, I have a couple of questions. I have several sections within my HTML that have CSS-rendered borders using the style:

border: 1px solid #004990;

When the HTML is rendered into PDF I can see the border drawn, but it's fuzzy. Is there any way to make the border crisp? I tried using 0.5px but that doesn't appear to work.

Also, I have another section that uses a border and I apply a border-radius. However, the border-radius doesn't appear to work. Here's the styling that I'm using:

border-radius: 25px;
margin: 80px 0 0 0;
padding: 30px;
border: 1px solid #004990;

Any help is greatly appreciated. Thanks!
mikeday
Whether the PDF looks crisp or fuzzy will depend on the PDF viewer, the zoom level, whether it is on screen or printed, and many other factors. It is not possible to control this in the PDF file itself, which is resolution-independent.

The border-radius issue is due to the "border" short-hand property overriding the border radius. The browsers don't do this any more, and we plan to change Prince to match them in the next release. In the meantime, a quick workaround is to move the border-radius property after the border property.