<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE document SYSTEM "rml_1_0.dtd"> 
<document filename="test_032_alt_images.pdf" invariant="1">
<docinit>
	<name id="default:image" value="testimg.gif"/>
</docinit>
<template pageSize="letter" leftMargin="72" showBoundary="1">
<pageTemplate id="main" pageSize="(595,842)">
	<pageGraphics>
		<setFont name="Helvetica-Bold" size="18"/>
		    <drawString x="35" y="783">RML Example 33: Images</drawString>
			<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72" required="no" alt_file=""/>
    		<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" alt_file="" required="no"/>
	</pageGraphics>
	<frame id="second" x1="35" y1="45" width="525" height="560"/>
	</pageTemplate>
	<pageTemplate id="main2" pageSize="(595,842)">
	<pageGraphics>
		<setFont name="Helvetica-Bold" size="18"/>
		    <drawString x="35" y="783">RML Example 33: Images</drawString>
			<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72" required="no" alt_file=""/>
    		<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" alt_file="" required="no"/>
	</pageGraphics>
	<frame id="second" x1="35" y1="45" width="525" height="685"/>
	</pageTemplate>
</template>
<stylesheet>
	<paraStyle name="h1" fontName="Helvetica-Bold" fontSize="16" leading="36"/>
	<paraStyle name="h2" fontName="Helvetica-Bold" fontSize="16" leading="20" spaceBefore="12"/>
	<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12" spaceBefore="6"/>
	<paraStyle name="intro"  fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
	<blockTableStyle id="simple">
		<blockAlignment value="center"/>
		<blockValign value="middle"/>
		<blockFont name="Helvetica"/>
		<lineStyle kind="GRID" colorName="black"/>
		<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
	</blockTableStyle>
	<blockTableStyle id="spartan">
		<blockAlignment value="center"/>
		<blockValign value="middle"/>
		<blockFont name="Helvetica"/>
	</blockTableStyle>
</stylesheet>

<story>
<storyPlace x="35" y="660" width="525" height="73" origin="page">
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
<hr color="white" thickness="8pt"/>
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
<illustration height="3" width="525" align="center">
<fill color= "(0,0.99,0.97,0.0)" />
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
</illustration>
</storyPlace>
<setNextTemplate name="main2"/>
<para style="h1">Image Functionality</para>
<para style="normal">This tries out missing images; the default image is "testing.gif"</para>

<para>file="bad_internet_access.pdf" alt_file="replogo.gif" required="true" (implied)</para>
<illustration height="150" width="432">
	<rect x="0" y="0" width="432" height="100" fill="0" stroke="0"/>
	<image file="bad_internet_access.pdf" x="0" y="0" alt_file="replogo.gif"/>
</illustration>

<para>file="bad_internet_access.pdf" alt_file="" required="no"</para>
<illustration height="150" width="432">
	<rect x="0" y="0" width="432" height="100" fill="0" stroke="0"/>
	<image file="bad_internet_access.pdf" x="0" y="0" alt_file="" required="no"/>
</illustration>

<para>file="bad_internet_access.pdf" alt_file not specified required="yes"</para>
<illustration height="150" width="432">
	<rect x="0" y="0" width="432" height="100" fill="0" stroke="0"/>
	<image file="bad_internet_access.pdf" x="0" y="0" required="yes"/>
</illustration>

<nextPage/>

<para>file="bad_replogo.gif" alt_file="replogo.pdf" not specified required="yes"</para>
<para style="normal">Now I will try and clip the silly image to something strange.</para>
<illustration height="200" width="150">	
	<saveState/>
	<path clip="yes" close="yes" x="75" y="0" stroke="no">10 100 75 180 140 200 140 100</path>
	<image file="bad_replogo.gif" x="0" y="0" width="155" height="202" showBoundary="no" preserveAspectRatio="yes" alt_file="replogo.gif"/>
	<restoreState/>
	<path clip="no" close="yes" x="75" y="0" stroke="yes">10 100 75 180 140 200 140 100</path>
</illustration>

</story>
</document>
