<project name="pdfencrypt" default="test" basedir=".">

	<description>Shows how reports could be encrypted when exported to PDF.</description>

	<property name="sample.dir" value="pdfencrypt"/>
	<property name="sample.base.name" value="PdfEncrypt" />
	<property name="sample.app.name" value="${sample.base.name}App" />
	<property name="sample.report.name" value="${sample.base.name}Report" />
	
	<target name="javac" description="Compiles the java source files of the test application.">
		<ant dir="../" target="javac"/>
	</target>

	<target name="compile" description="Compiles the XML report design and produces the .jasper file.">
		<ant dir="../" target="compile"/>
	</target>

	<target name="fill" description="Fills the compiled report design with data and produces the .jrprint file.">
		<ant dir="../" target="fill"/>
	</target>

	<target name="view" description="Launches the report viewer to preview the report stored in the .jrprint file.">
		<ant dir="../" target="view"/>
	</target>

	<target name="pdf" description="Generates a PDF version of the report by converting the .jrprint file.">
		<ant dir="../" target="pdf"/>
	</target>

	<target name="decompile" description="Decompiles a .jasper file into a .jrxml file.">
		<ant dir="../" target="decompile"/>
	</target>

	<target name="writeApi" description="Generates a .java version of the report by converting the .jrxml file.">
		<ant dir="../" target="writeApi"/>
	</target>

	<target name="writeApiXml" description="Generates a .jrxml version of the report by executing the API version of the report design.">
		<ant dir="../" target="writeApiXml"/>
	</target>

	<target name="clean" description="Deletes all the generated files.">
		<ant dir="../" target="clean-sample"/>
	</target>
	
	<target name="test" description="Runs the sample.">
		<echo message="==================================="/>
		<echo message=" PDF Encrypt Sample"/>
		<echo message="==================================="/>
		<antcall target="clean" />
		<antcall target="javac" />
		<antcall target="compile" />
		<ant dir="../" target="test"/>
	</target>

</project>
