Forum Bugs

css clip:rect on does not show properly

Elite Image
Using Prince 6.0

So I am using a clip:rect in my css style for an image so I can just use a partial part of the image. I stretch the image out, and then just clip the area of the image I want in the spot I want my image.

The HTML file that is created shows the image properly clipped, but when I open the PDF file, the image is not showing properly, it is clipping a completely different part of the image, and not even filling the 'area' that the image is placed in properly, only showing it partially.

Any help appreciated.
mikeday
Can you post or email your document / style sheet for us to take a look at? Perhaps there are some values that Prince is not handling properly.
Elite Image
Here is a link to the document.

http://icechat.net/beta/elite/34.html
Elite Image
And sorry, here is the link to the PDF file it creates.

http://icechat.net/beta/elite/34.pdf
mikeday
Try changing the image width/height attributes to unitless numbers, representing pixel lengths, or use the CSS width/height properties with pixel values instead. eg. replace this:
<img width="824px" height="595px" src="seder_hi-res.jpg" />

with this:
<img width="824" height="595" src="seder_hi-res.jpg" />
Elite Image
Hello

So I tried using <img width="824" height="595" src="seder_hi-res.jpg" /> and <img style="width:824px; height:595px" src="seder_hi-res.jpg" /> and they both showed the same results as the original did, no changes.
mikeday
Seems that this could be related to an issue that we have fixed, as I get better results when I try in Prince 7.1. Can you try a more recent version of Prince?
Elite Image
Well, it costs $950 to upgrade our version of prince.According to the documention, the clip:rect does should in 6.0.
Any ideas of what can be done there?
mikeday
Try adding this CSS rule:
img { max-width: none }

This will override the "max-width: 100%" that we apply to <img> elements in the default style sheet. We have removed this in more recent versions of Prince.
Elite Image
Wow, looks like that did the trick.

Thanks very much, but I will let you know if I find any further problems.