Hi,

I'm trying to clip an image with a rounded-corner rectangle (or any other
non-standard shape for that matter).
I could not find any way to do this with xsl-fo, so I took the approach of
embedding svg, like this:

  <fo:block-container top="8mm" height="198.5mm" width="101mm" left="0"
position="absolute">
   <fo:block>
    <!-- the background block is 1cm more wide so the round edge fall 1cm
off the paper -->
    <fo:instream-foreign-object content-width="111mm"
content-height="198.5mm">
     <svg:svg width="111mm" height="198.5mm">
      <svg:g clip-rule="nonzero">
       <svg:clipPath id="MyClip">
        <svg:rect x="-1cm" y="0" width="111mm" height="56mm" rx="5"/>
       </svg:clipPath>
       <!-- image is put 1mm further to the right so it falls over the
rectangle border -->
       <xsl:variable name="imageUrl" select="Image"/>
       <svg:image clip-path="url(#MyClip)" x="4mm" y="0" width="111mm"
height="50mm" xlink:href="{$imageUrl}">
         </svg:image>
      </svg:g>
     </svg:svg>
    </fo:instream-foreign-object>
   </fo:block>
  </fo:block-container>

This works fine when I view this with AWT, but when I generate a PDF, the
quality of the graphics is bad. I've read that this because the current
SVG-> PDF rendering gives a maximum quality of 72dpi, which is way to low
for professional printing (for which I want to use this).

Does anyone know of a way to work around this?
I use fop 0.20.5.

Regards,
Wouter de Vaal

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to