Hi,

I am looking for a way that an image scales to fit the page. I have tried 
various solutions but non worked.

The image on the page is too big to fit the page so it is not shown entirely. 
How can I scale in fop to see the full image on the image ?

Many Thanks !

Ronny
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
    xmlns:fo="http://www.w3.org/1999/XSL/Format"; exclude-result-prefixes="fo">
<xsl:template match="images">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
      <fo:layout-master-set>
        <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="simpleA4">
        <fo:flow flow-name="xsl-region-body">
          <fo:block font-size="16pt" font-weight="bold" space-after="5mm">Company Name: <xsl:value-of select="companyname"/>
          </fo:block>        
		  
		  <fo:block font-size="10pt">
          <fo:table>    
            <fo:table-column/>
                <fo:table-body>
                	<xsl:apply-templates select="image"/>
				</fo:table-body>
          </fo:table>
          </fo:block>
        </fo:flow>
      </fo:page-sequence>
     </fo:root>
</xsl:template>
 
  <xsl:template match="image">
   <fo:table-row>  
	<fo:table-cell>
		<fo:block>
			<fo:external-graphic src="url(file:/C:/testimage/test.png)" width="100%" height="100%" content-height="scale-down-to-fit" content-width="scale-down-to-fit"/>
		</fo:block>
	</fo:table-cell>
	</fo:table-row>  
  </xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to