<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SOASI &#187; xml format</title>
	<atom:link href="http://www.soasi.com/tag/xml-format/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.soasi.com</link>
	<description>Sviluppo Software e Sistemi Open Source a Forlì</description>
	<lastBuildDate>Wed, 25 Jan 2012 15:06:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Howto: Make RML templates from Openoffice.org ODT files</title>
		<link>http://www.soasi.com/2009/12/make-rml-templates-from-openoffice-org-odt-files/</link>
		<comments>http://www.soasi.com/2009/12/make-rml-templates-from-openoffice-org-odt-files/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 10:10:02 +0000</pubDate>
		<dc:creator>SOASI</dc:creator>
				<category><![CDATA[E-Commerce]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[markup language]]></category>
		<category><![CDATA[odt files]]></category>
		<category><![CDATA[openoffice]]></category>
		<category><![CDATA[packing slip]]></category>
		<category><![CDATA[page dimensions]]></category>
		<category><![CDATA[placeholders]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rml]]></category>
		<category><![CDATA[Satchmo]]></category>
		<category><![CDATA[shipping labels]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[xml format]]></category>

		<guid isPermaLink="false">http://www.soasi.com/?p=499</guid>
		<description><![CDATA[Report Markup Language (RML) is the ReportLAB and Open ERP format for pdf reports. It&#8217;s an XML format and it can be easy generated from web application, such as Django. Satchmo uses rml templates for shipping labels, invoices and packing slip. One way to generate those templates it to write by hand the XML, with [...]]]></description>
			<content:encoded><![CDATA[<p>Report Markup Language (<strong>RML</strong>) is the ReportLAB and Open ERP format for pdf reports. It&#8217;s an XML format and it can be easy generated from web application, such as Django. <strong>Satchmo</strong> uses rml templates for shipping labels, invoices and packing slip.</p>
<p>One way to generate those templates it to write by hand the XML, with some difficult actions needed to generate tables and complex items.</p>
<p>Another easy way is to use OpenOffice.org to make the template.<span id="more-499"></span><br />
The procedure is quite simple and we&#8217;ll explain it here.</p>
<p>First of all, generate a text odt document. If you use tables, make sure to have the same number of column for every rows. If you need a more complicated table, split it in different tables or good results will be difficult to achieve.</p>
<p>Format the page dimensions with openoffice, it will be the same on pdf.</p>
<p>In your template you must be sure to put also the text you will change, to format it to your needs. To use it in a django app, you can use the django template system placeholders like {{name}} or {{address}}.</p>
<p>Then, save it and use Tiny <a target="_blank" rel="nofollow" href="http://dev.communesplone.org/trac/browser/communesplone/openerp/training/training/report/tiny_sxw2rml?rev=3486">SXW2RML</a> to transform it to RML. </p>
<p><code>./tiny_sxw2rml.py template.odt > template.rml</code></p>
<p>You can use python-trml2pdf to see the results:<br />
<code>apt-get install python-trml2pdf</code></p>
<p>and then<br />
<code>trml2pdf template.rml > template.pdf</code></p>
<p>If it&#8217;s good, you can simply replace placeholders with the text of your report (or packing slip, as we&#8217;ve done) and then generate your pdf. Using them on django apps makes RML a very good choice to generate automatically documents from databases and web apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soasi.com/2009/12/make-rml-templates-from-openoffice-org-odt-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

