Forum How do I...?

Link around a rotated image

sstanelle
Hi,

I have a need to wrap an image with a link. This generally works just fine with the exception of when the image is rotated. The following HTML code functions well when viewed as HTML. That is, hovering anywhere over the rotated image activates the link. However, when I run it through the Prince converter, the link is only active when hovering over the bounding box of the image prior to rotation. In this case, the link is not active in the PDF when hovering over the top or bottom part of the rotated image, but the link is active when hovering outside the rotated image to either the left or right of the image. Am I missing something or is there a way to prevent this behavior?

Thanks!

Scott Stanelle

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<p>
<a href="http://www.theargonaut.com">
<img src="sample.jpg" style="width: 300pt; transform: rotate(90deg);" />
</a>
</p>
</body>
</html>
mikeday
Currently CSS transforms don't affect links, we plan to fix this.
sstanelle
Hi Mike,

Thanks for your response! Do you happen to know if there is a timeline for this?

Scott
sstanelle
Hi Mike,

Sorry to be a pest. Do you have any information that you can share with me regarding a timeline? We currently have a very large and very picky client (who also happens to make a pretty decent and popular smart phone) who is pushing back and insisting on a better user experience. Personally I don't think it is that big of a deal since the link still works. Any way whatever you can tell me that I could pass on to the client that may appease them would be greatly appreciated. I haven't really been able to find a work around.

Thanks!
mikeday
Sorry for the delay, I will see if we can expedite this fix.
mikeday
We have a fix for this issue available now in latest builds. The fix isn't in Prince 12, but will be included in the next maintenance release.
sstanelle
Very cool! Thanks!
sstanelle
Just downloaded. It works great for my 90 degree rotation case. However, it's still a little funky in the 45 degree case. Anything you can do about that? Thanks!
  1. Test.png1.2 kB
  2. linktest.html0.4 kB
  3. linktest.pdf6.2 kB
mikeday
Basic PDF links are always axially aligned rectangles, so a 45 degree rotation is the worst possible case.

I think newer versions of the PDF standard include support for polygonal links, but we will need to check whether PDF viewers support them yet.
mikeday
Support for rotated links is now available in Prince 12.1 using PDF "QuadPoints" annotations; older PDF viewers will fall back to the rectangular boxes.