xml - Image not displaying completely -
i need display svg image pdf file. below xslt code:
<fo:block text-align="left" display-align="left" absolute-position="absolute" left="-1.5cm" top="-1cm"> <fo:external-graphic content-width="scale-to-fit" width="100%" content-height="50%" scaling="uniform"> <xsl:attribute name="src"> <xsl:value-of select="$src" /> </xsl:attribute> </fo:external-graphic> </fo:block>
explaination: xml has many images. above code runs in loop , displays images 1 one. images height more page height, image getting cut. tried giving height = 50%. image width reducing.
basically want image should fit in block. , bigger images should not cut. should fit in block given. please help.
but if reduce height, width gets reduced.
this presumably because have specified scaling="uniform"
on graphic. "preserve aspect ratio" (see relevant part of specification here).
<fo:external-graphic content-width="scale-to-fit" width="100%" content-height="50%" scaling="non-uniform"> <!--...--> </fo:external-graphic>
Comments
Post a Comment