<!DOCTYPE document SYSTEM "rml_1_0.dtd"> 
<document filename="test_034_cmyk.pdf" invariant="1" colorSpace="CMYK">
<docinit>
	<color id="CMYK_WHITE" CMYK="[0,0,0,0]"/>
	<color id="CMYK_BLACK" CMYK="rgb(0,0,0)"/>
	<!-- this will raise an error:   <color id="CMYK_RED" CMYK="rgb(1,0,0)"/> -->
</docinit>

<template pageSize="letter" leftMargin="72" showBoundary="1">
	<pageTemplate id="main" pageSize="A4">
	<pageGraphics>
		 <setFont name="Helvetica-Bold" size="18"/>
		    <drawString x="35" y="783">RML Example 35: Cmyk</drawString>
			<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
    		<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
		<fill color="[1,0,0,0]"/>
		<rect x="100" y="580" width="50" height="50" fill="1"/>
		<fill color="[0,1,0,0]"/>
		<rect x="200" y="580" width="50" height="50" fill="1"/>
		<fill color="[0,0,1,0]"/>
		<rect x="300" y="580" width="50" height="50" fill="1"/>
		<fill color="PCMYKColor(0,50,85,20,spotName='PANTONE 288 CV')"/>
		<rect x="400" y="580" width="50" height="50" fill="1"/>
	</pageGraphics>
	<frame id="first" x1="1in" y1="3in" width="6.27in" height="3in"/>
	</pageTemplate>
</template>

<stylesheet>
	<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12" textColor="[0,0,0,1]"/>
	<paraStyle name="h1" parent="normal" fontName="Helvetica-BoldOblique" fontSize="32" leading="36"/>
	<paraStyle name="spaced" parent="normal" spaceBefore="12" spaceAfter="12"/>
	<paraStyle name="intro"  fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
</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>
	<para style="normal">This is a test of CMYK support.
	</para>
	<para style="normal">The four swatches above should be in the CMYK primaries, and the paragraph carefully
	declares the text color to be process black (k=1).
	</para>
	<spacer length="6"/>
	<para style="normal">This is cmyk white text on cmyk black rectangle</para>
	<spacer length="6"/>
	<illustration height="15" width="144">
		<setFont name="Helvetica-Bold" size="12"/>
		<fill color="CMYK_BLACK"/>
		<rect x="0" y="0" width="144" height="15" fill="yes" stroke="no"/>
		<fill color="CMYK_WHITE"/>
		<drawString x="1" y="4">Hello World</drawString>
	</illustration>
	<spacer length="6"/>
	<para style="normal">This is rgb white text on rgb black rectangle</para>
	<spacer length="6"/>
	<illustration height="15" width="144">
		<setFont name="Helvetica-Bold" size="12"/>
		<fill color="black"/>
		<rect x="0" y="0" width="144" height="15" fill="yes" stroke="no"/>
		<fill color="white"/>
		<drawString x="1" y="4">Hello World</drawString>
	</illustration>
	<spacer length="6"/>
	<para style="normal">This is rgb white text on cmyk black rectangle</para>
	<spacer length="6"/>
	<illustration height="15" width="144">
		<setFont name="Helvetica-Bold" size="12"/>
		<fill color="CMYK_BLACK"/>
		<rect x="0" y="0" width="144" height="15" fill="yes" stroke="no"/>
		<fill color="white"/>
		<drawString x="1" y="4">Hello World</drawString>
	</illustration>
	<spacer length="6"/>
	<para style="normal">This is cmyk white text on rgb black rectangle</para>
	<spacer length="6"/>
	<illustration height="15" width="144">
		<setFont name="Helvetica-Bold" size="12"/>
		<fill color="black"/>
		<rect x="0" y="0" width="144" height="15" fill="yes" stroke="no"/>
		<fill color="CMYK_WHITE"/>
		<drawString x="1" y="4">Hello World</drawString>
	</illustration>
</story>

</document>
