Loading ...
Sorry, an error occurred while loading the content.

How to avoid overflow when rendering image?

Expand Messages
  • ca_xiaoyi2003
    Hello! I got a question about how to render big graphic.
    Message 1 of 1 , Feb 15, 2005
    • 0 Attachment
      Hello!

      I got a question about how to render big graphic.

      <xsl:template match="large.graphic">
      <fo:block text-align="center">
      <fo:external-graphic content-width="scale-to-
      fit" content-height="scale-to-fit" scaling-method="auto">
      <xsl:attribute name="src">
      <xsl:text>url('</xsl:text>
      <xsl:value-of select="$with"/>
      <xsl:value-of select="@file"/>
      <xsl:text>')</xsl:text>
      </xsl:attribute>
      <!-- we need to update this because
      the width mayb be bigger than page-->
      <xsl:attribute name="width">
      <xsl:text>100%</xsl:text>
      </xsl:attribute>
      <xsl:attribute name="height">
      <xsl:text>auto</xsl:text>
      </xsl:attribute>
      </fo:external-graphic>
      </fo:block>
      </xsl:template>

      but sometimes. I find that picture maybe override the area <fo:region-
      after extent="0.7in" region-name="xsl-region-after-main"/>


      <fo:simple-page-master master-name="main" page-height="11in" page-
      width="8.5in" margin-top="0.25in" margin-bottom="0.25in" margin-
      left="0.5in" margin-right="0.25in">
      <fo:region-body margin-top="0.25in" margin-bottom="1in">
      </fo:region-body>
      <fo:region-before extent="1in" region-name="xsl-region-before-
      main"/>
      <fo:region-after extent="0.7in" region-name="xsl-region-after-
      main"/>
      </fo:simple-page-master>
    Your message has been successfully submitted and would be delivered to recipients shortly.