[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Obtaining Graphic File Widths

Subject: Obtaining Graphic File Widths
From: "Ryan Lubben" <ryanl@xxxxxxxxxxx>
Date: Mon, 10 Jul 2006 15:13:42 -0500
getwidth returns nominal.image.width
Hello All,

I am trying to set up my stylesheet/FO so that it would be able to look at
any graphic files used an XML file and obtain the actual width of the image.
Is it possible to get the width value of a graphic file (we are using SVGs)
using a Java extension or by some other method? I have tired using the
document() function to call on the SVG (since it is an XML file after all)
and grab the width attribute, but apparently the document function only
works on files with a .xml extension. I have also tried using the
ximg:getWidth function but didnt have much luck with that eithernot sure,
but this might be because I am not using the Docbook stylesheet. I was able
to plug everything into my styleheet but only got 0 as a return value for
the graphic width.

        <xsl:when test="function-available('ximg:getWidth')">
               <xsl:value-of select="ximg:getWidth(ximg:new($filename),
                                                $nominal.image.width)"/>
        </xsl:when>

I am currently using Xalan 2.7.0 with Antenna Houses XSLFormatter V3 for my
PDF output.

Any help would be greatly appreciated.

Thanks,

Ryan Lubben
Content Management Developer/
Technical Writer
Ken Cook Company
ryanl@xxxxxxxxxxx

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.