« View Contents Of SSL CertificateAdding MySQL Users »

Image Sizes In XSL-FO

02/23/05

Permalink 07:02:58 am, by admin Email , 199 words   English (US)
Categories: XSL-FO

Image Sizes In XSL-FO

Here was the question:

How can we define an exact image size?

The image height and width values change the apperance of the image but not in a way I'd expect. When I call the logo.gif image up in Photoshop it tells me it 221 pixels wide by 96 pixels tall or 3.069 inches by 1.333 inches. Both of these lines produce the same results but the image looks slightly skewed. I changed the image to be exactly 3" by 1" or 216px by 72px


This creates an image that is about 2 7/8" by 15/16"


fo:external-graphic src="file:images/logo.gif" width="3in" height="1in"


this line creates the same thing...


fo:external-graphic src="file:images/logo.gif" width="216px" height="72px"


Is there something I need to set to zero, like cellspacing=0 or
cellpadding=0 ?

And here was the answer:

This problem come down to image resolutiosn. Here's an FO faq entry that talks about image resolution. I think this is where your problem is coming from:

http://xml.apache.org/fop/graphics.html#resolution

Here's a link to the fo:external-graphic description in the spec:

http://www.w3.org/TR/xsl/slice6.html#fo_external-graphic

To attributes that look relevant are "scaling" and "scaling-method".

July 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

powered by b2evolution