MIMETools provides the &lt;--#mime--&gt; tag for DocumentTemplate.