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

scaling of graphics

Expand Messages
  • ronald heller
    Hi there I ve got a question concerning auto scaling of graphics. We have an automated publishing traject where we make use of a lot of graphics. These
    Message 1 of 2 , May 14, 2001
    View Source
    • 0 Attachment
      Hi there I've got a question concerning auto scaling of graphics.

      We have an automated publishing traject where we make use of a lot of
      graphics. These graphics need to be scaled if their dimensions are bigger
      than the page.

      Problem is, that I do not know these dimensions, they can differ for each
      graphic.

      Is there some way of testing the dimensions of the graphics in XSL fo or
      should I have another script that reads in all these dimensions for me?

      Mind, that the dimensions are not specified in the XML, but can only come
      from the graphic itself.

      Ronald
    • John E. Simpson
      ... You ll probably have to do the latter. I don t think there are any functions, properties, etc. which return an image s dimensions. If you had the
      Message 2 of 2 , May 14, 2001
      View Source
      • 0 Attachment
        ronald heller wrote:

        > Is there some way of testing the dimensions of the graphics in XSL fo or
        > should I have another script that reads in all these dimensions for me?

        You'll probably have to do the latter. I don't think there are any
        functions, properties, etc. which return an image's dimensions.

        If you had the dimensions coded in a quick-and-dirty well-formed XML
        document, you could use this as input to the transformation. Something like:

        <imgs units="mm">
        <img>
        <name>figure1.jpg</name>
        <height>157</height>
        <width>125</width>
        </img>
        (etc.)
        </imgs>
        Then you can use the XSLT document() function to get dimensions for a
        particular image, compare to the page size, and clip or scale accordingly.

        Interesting problem. I'd be interested in knowing if anyone else on the
        list has any brainstorms.
        ================================================================
        John E. Simpson | "I can levitate birds. No one cares."
        http://www.flixml.org | (Steven Wright)
        XML Q&A: www.xml.com |
      Your message has been successfully submitted and would be delivered to recipients shortly.