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

Image cut-off problem

Expand Messages
  • rohit ranjan
    Hi, I am new to FO and I am using FOP to render my document.I am having two issues with Image. 1.In one page I have very big image and that can t be fitted in
    Message 1 of 4 , Mar 8, 2004
    • 0 Attachment
      Hi,

      I am new to FO and I am using FOP to render my document.I am having
      two issues with Image.

      1.In one page I have very big image and that can't be fitted in one
      page.One workaround might be to check the image size and adjust it in
      XML.But this is not proper solution.Is there any way to have sth in
      my stylesheet to take care of this problem?

      2.If I have several images of not so big in size and there is nothing
      rendered between the images.Its one image after another,there comes a
      point when one image will hit the boundary and it gets cut-off and
      again subsequent images are rendered fine,only problem comes with the
      image which is posiiotned last in the page and doesn't have enough
      space to fit itself.


      I tried few things but nothing seems to work.I will appreciate any
      input on it.Thanks in advance.Following is the code I am using in my
      stylesheet.

      Rohit

      --------

      <xsl:template match="maths/img">
      <fo:inline space-after="15pt" space-before="15pt" >
      <fo:external-graphic position="absolute"
      src="url({@file})" scaling-method="integer-pixels">
      <xsl:attribute
      name="height"><xsl:call-template name="get_size"><xsl:with-param
      name="size_in" select="@he"/></xsl:call-template></xsl:attribute>
      <xsl:attribute name="width"><xsl:call-
      template name="get_size"><xsl:with-param name="size_in"
      select="@wi"/></xsl:call-template></xsl:attribute>
      </fo:external-graphic>
      <xsl:apply-templates/>
      </fo:inline>

      </xsl:template>
      --------------
    • Victor Vishnyakov
      I haven t clearly understand what you need, but you can try using percents in the width or height attribute. E.g.
      Message 2 of 4 , Mar 9, 2004
      • 0 Attachment
        I haven't clearly understand what you need, but you can try using
        percents in the width or height attribute.

        E.g. <fo:external-graphics ... width="100%" ../>

        Regards,
        Victor Vishnyakov




        > -----Original Message-----
        > From: rohit ranjan [mailto:rohitranjan15@...]
        > Sent: Monday, March 08, 2004 5:45 PM
        > To: XSL-FO@yahoogroups.com
        > Subject: [XSL-FO] Image cut-off problem
        >
        >
        > Hi,
        >
        > I am new to FO and I am using FOP to render my document.I am having
        > two issues with Image.
        >
        > 1.In one page I have very big image and that can't be fitted in one
        > page.One workaround might be to check the image size and adjust it in
        > XML.But this is not proper solution.Is there any way to have sth in
        > my stylesheet to take care of this problem?
        >
        > 2.If I have several images of not so big in size and there is nothing
        > rendered between the images.Its one image after another,there comes a
        > point when one image will hit the boundary and it gets cut-off and
        > again subsequent images are rendered fine,only problem comes with the
        > image which is posiiotned last in the page and doesn't have enough
        > space to fit itself.
        >
        >
        > I tried few things but nothing seems to work.I will appreciate any
        > input on it.Thanks in advance.Following is the code I am using in my
        > stylesheet.
        >
        > Rohit
        >
        > --------
        >
        > <xsl:template match="maths/img">
        > <fo:inline space-after="15pt" space-before="15pt" >
        > <fo:external-graphic position="absolute"
        > src="url({@file})" scaling-method="integer-pixels">
        > <xsl:attribute
        > name="height"><xsl:call-template name="get_size"><xsl:with-param
        > name="size_in" select="@he"/></xsl:call-template></xsl:attribute>
        > <xsl:attribute name="width"><xsl:call-
        > template name="get_size"><xsl:with-param name="size_in"
        > select="@wi"/></xsl:call-template></xsl:attribute>
        > </fo:external-graphic>
        > <xsl:apply-templates/>
        > </fo:inline>
        >
        > </xsl:template>
        > --------------
        >
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
      • rohit ranjan
        Sorry for not making it clear. I will give it another try.Lets say , I have two inline images and they can t fit in single page and there is no text between
        Message 3 of 4 , Mar 9, 2004
        • 0 Attachment
          Sorry for not making it clear.

          I will give it another try.Lets say , I have two inline images and
          they can't fit in single page and there is no text between the
          image ,just two image.First one displays fine but second one gets
          cutt-off due to lack of space.

          I tried width=100% , but output is still same.

          Two things can solve this problem.If the second one gets pushed down
          in next page or its fit to scale(its not implemented in FOP)

          Thanks,

          Rohit
          --- In XSL-FO@yahoogroups.com, "Victor Vishnyakov" <tch_@m...> wrote:
          > I haven't clearly understand what you need, but you can try using
          > percents in the width or height attribute.
          >
          > E.g. <fo:external-graphics ... width="100%" ../>
          >
          > Regards,
          > Victor Vishnyakov
          >
          >
          >
          >
          > > -----Original Message-----
          > > From: rohit ranjan [mailto:rohitranjan15@y...]
          > > Sent: Monday, March 08, 2004 5:45 PM
          > > To: XSL-FO@yahoogroups.com
          > > Subject: [XSL-FO] Image cut-off problem
          > >
          > >
          > > Hi,
          > >
          > > I am new to FO and I am using FOP to render my document.I am
          having
          > > two issues with Image.
          > >
          > > 1.In one page I have very big image and that can't be fitted in
          one
          > > page.One workaround might be to check the image size and adjust
          it in
          > > XML.But this is not proper solution.Is there any way to have sth
          in
          > > my stylesheet to take care of this problem?
          > >
          > > 2.If I have several images of not so big in size and there is
          nothing
          > > rendered between the images.Its one image after another,there
          comes a
          > > point when one image will hit the boundary and it gets cut-off
          and
          > > again subsequent images are rendered fine,only problem comes with
          the
          > > image which is posiiotned last in the page and doesn't have
          enough
          > > space to fit itself.
          > >
          > >
          > > I tried few things but nothing seems to work.I will appreciate
          any
          > > input on it.Thanks in advance.Following is the code I am using in
          my
          > > stylesheet.
          > >
          > > Rohit
          > >
          > > --------
          > >
          > > <xsl:template match="maths/img">
          > > <fo:inline space-after="15pt" space-before="15pt" >
          > > <fo:external-graphic position="absolute"
          > > src="url({@file})" scaling-method="integer-pixels">
          > > <xsl:attribute
          > > name="height"><xsl:call-template name="get_size"><xsl:with-param
          > > name="size_in" select="@he"/></xsl:call-template></xsl:attribute>
          > > <xsl:attribute name="width"><xsl:call-
          > > template name="get_size"><xsl:with-param name="size_in"
          > > select="@wi"/></xsl:call-template></xsl:attribute>
          > > </fo:external-graphic>
          > > <xsl:apply-templates/>
          > > </fo:inline>
          > >
          > > </xsl:template>
          > > --------------
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          > >
          > >
        • Victor Vishnyakov
          ... Yo have answered yourself. As far as FOP is incomplete for your stylesheets you have to take a look at commercial formatter. The free cheese is only in the
          Message 4 of 4 , Mar 9, 2004
          • 0 Attachment
            > Two things can solve this problem.If the second one gets pushed down
            > in next page or its fit to scale(its not implemented in FOP)

            Yo have answered yourself.
            As far as FOP is incomplete for your stylesheets you have to take a look
            at commercial formatter. The free cheese is only in the mouse-trap ...
            for the second mouse only.

            You can use 7.20.2 "overflow" attribute with "scroll" value. But it is
            not OK for print-oriented PDFs and I'm not sure that formatters
            implement it.

            Regards,
            Victor Vishnyakov



            > -----Original Message-----
            > From: rohit ranjan [mailto:rohitranjan15@...]
            > Sent: Tuesday, March 09, 2004 6:23 PM
            > To: XSL-FO@yahoogroups.com
            > Subject: [XSL-FO] Re: Image cut-off problem
            >
            >
            > Sorry for not making it clear.
            >
            > I will give it another try.Lets say , I have two inline images and
            > they can't fit in single page and there is no text between the
            > image ,just two image.First one displays fine but second one gets
            > cutt-off due to lack of space.
            >
            > I tried width=100% , but output is still same.
            >
            > Two things can solve this problem.If the second one gets pushed down
            > in next page or its fit to scale(its not implemented in FOP)
            >
            > Thanks,
            >
            > Rohit
            > --- In XSL-FO@yahoogroups.com, "Victor Vishnyakov" <tch_@m...> wrote:
            > > I haven't clearly understand what you need, but you can try using
            > > percents in the width or height attribute.
            > >
            > > E.g. <fo:external-graphics ... width="100%" ../>
            > >
            > > Regards,
            > > Victor Vishnyakov
          Your message has been successfully submitted and would be delivered to recipients shortly.