Graphics

Contact Us or call 1-877-932-8228
Graphics

Graphics

The syntax of adding a graphic is as follows.

<fo:external-graphic src="url('http://www.webucator.com/images/logo.gif')" width="300px" height="75px"/>

The following code shows how we could insert a picture of the Beatles above the list of links from the last example.

Code Sample:

LinksAndGraphics/Demos/Beatles2.fo
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
---- C O D E   O M I T T E D ----
<fo:flow flow-name="xsl-region-body">
			<fo:block space-after="10pt">
				<fo:external-graphic src="url('Images/beatles.jpg')" 
					width="340px" height="238px"/>
			</fo:block>
---- C O D E   O M I T T E D ----
</fo:flow>
	</fo:page-sequence>
</fo:root>

The result would look like this.

Next