Why z3c.RML ignores the pageSize Attribute of <template>
<p>I am trying to get an A4-Landscape output file. The Document i am modifying is A4-Portrait, so i thought simple switch: <strong><em>pageSize="(21cm, 29.7cm)"</em></strong> to <strong><em>pageSize="(29.7cm, 21cm)"</em></strong>, but nothing happend.</p>

<p>I then fount an Attribute: <strong><em>rotation="90"</em></strong>. The Page on the Screen ist still A4-Portrait, but the content ist turned 90 degres around. On paper it woulde be fine, but on screen i have to turn my head by 90 degress, not very comfortable.</p>

<p>After this i tryed: <strong><em>pageSize="(10cm, 10cm)"</em></strong>, thought this should look terrible, but nothing changed.</p>

<p>Could it be possible, that the Size of the generated PDF-File is set in thePython-Code and not set by the RML-File?</p>

<p>This is the Python Code:</p>

<pre><code>#!venv/bin/python
# -*- coding: utf-8 -*-
from z3c.rml import pagetemplate
rmlPageTemplate = pagetemplate.RMLPageTemplateFile("test.rml")
open('test.pdf', 'wb').write(rmlPageTemplate())
</code></pre>

<p>My RML-File locks like:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;!DOCTYPE document SYSTEM "rml_1_0.dtd"&gt;
&lt;document test.pdf"&gt;
    &lt;docinit&gt;
        ...
    &lt;/docinit&gt;
    &lt;template   pageSize="(10cm, 10cm)"
                rotation="90"
                leftMargin="2.5cm"
                rightMargin="2.5cm"
                topMargin="2.5cm"
                bottomMargin="2.5cm"
                showBoundary="1"
                &gt;
        &lt;pageTemplate id="main"&gt;
            &lt;frame id="first" x1="2.5cm" y1="2.5cm" width="24.7cm" height="16cm" showBoundary="1"/&gt;
        &lt;/pageTemplate&gt;
    &lt;/template&gt;
    &lt;stylesheet&gt;
        ...
    &lt;/stylesheet&gt;
    &lt;story&gt;
        ...
    &lt;/story&gt;
&lt;/document&gt;
</code></pre>

<p>Thank you very much.</p>

<p><a href="https://github.com/zopefoundation/z3c.rml/blob/master/RML-DIFFERENCES.rst" rel="nofollow">https://github.com/zopefoundation/z3c.rml/blob/master/RML-DIFFERENCES.rst</a></p>

<p><strong>RML2PDF and z3c.rml Implementation Differences</strong></p>

<p>This document outlines the differences between ReportLab Inc.'s RML2PDF library and z3c.rml.</p>

<p><strong>Incompatibilies</strong></p>

<p>
<em>page<strong>S</strong>ize</em>: This is called page<strong>s</strong>ize in this implementation to match the API.</p>

python reportlab rml