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

Re: fo:external-graphics tag

Expand Messages
  • vijay_singh
    ... the ... strechs ... generate ... for ... Thanks Eliot
    Message 1 of 3 , Sep 15 6:36 PM
    • 0 Attachment
      --- In XSL-FO@yahoogroups.com, "W. Eliot Kimber" <ekimber@i...> wrote:
      > --- In XSL-FO@yahoogroups.com, "vijay_singh" <vijay_singh@y...>
      wrote:
      > > Hi
      > > Now I can shrink the image height to 500pt by height attribute of
      the
      > > fo:external-graphics tag and make the scale=uniform, but this
      strechs
      > > the smaller image.
      >
      > With FO 1.0, the only thing you can do, short of a proprietary
      > extension, is to determine the graphic's size at the time you
      generate
      > the FO. This can be done fairly easily with Java through an XSLT
      > extension function, using the Sun-provided JAI library:
      >
      > RenderedOp img = JAI.create("fileload", fileName);
      > height = String.valueOf(img.getHeight());
      > width = String.valueOf(img.getWidth());
      >
      > Given this info you should then be able to determine whether the
      > graphic should be scaled down or left alone.
      >
      > In FO 1.1 the set of scaling options has been extended to provide
      for
      > this case.
      >
      > Cheers,
      >
      > Eliot

      Thanks Eliot
    Your message has been successfully submitted and would be delivered to recipients shortly.