Scaling image problem

"Beugnier, Ronny (IP&Science)" <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <CY1PR10MB0887236FF4F8FFF66F0C9B22894A0@CY1PR10MB0887.namprd10.prod.outlook.com>
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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
test.png (image/png, 51.3 KB) - not displayed
template.xsl (text/xml, 1.5 KB)
<?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>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.