speedata / publisher

speedata Publisher - a professional database Publishing system
https://www.speedata.de/
GNU Affero General Public License v3.0
296 stars 36 forks source link

Placing header/footer outside pagecontent? (Rendering table with "Ausgabe") #40

Closed MDeutschmann-Imperia closed 9 years ago

MDeutschmann-Imperia commented 9 years ago

Working with speedata publisher is a pleasure and while doing another proof of concept a few questions came up.

The given document needs an permanent (on each page) header and footer outside the general page/content area. That was realized by defining a "Rand" and a smaller "Platzierungsbereich" while placing the header/footer content inside the Rand but outside the Platzierungsbereich.

  <Seitentyp name="Seite rechts" bedingung="sd:ungerade( sd:aktuelle-seite() )">
    <Rand links="2.5cm" rechts="2cm" oben="1.7cm" unten="1cm" />
    <Platzierungsbereich name="text">
        <Platzierungsrahmen breite="{ sd:anzahl-spalten() }" höhe="{ sd:anzahl-zeilen() - 2 }" zeile="2" spalte="1"/>
    </Platzierungsbereich> 
    <BeiSeitenAusgabe>
<!-- header -->
<ObjektAusgeben spalte="1" zeile="1">
            <Textblock breite="12">
              <Absatz schriftart="Kopfzeile" textformat="links"><Wert>Header</Wert></Absatz>
            </Textblock>
          </ObjektAusgeben>
...

In general text ist rendered using "Ausgabe" with target Platzierungsbereich "text" to take care of the header-area if content fits more than one page.

<Datensatz element="Text">
    <Ausgabe bereich="text">
      <Text>
        <Absatz>
            <FürAlle auswahl="*">
                <Wert auswahl="." />
            </FürAlle>
        </Absatz>
....

The reason why i create this issue: If i gonna place a table inside the document i cannot use "Ausgabe" but only "ObjektAusgeben" which doesn't respect the Platzierungsbereich "text" and overwrites the header-area on the second page if the table is longer than one page.

  <Datensatz element="Tab">
  <ObjektAusgeben spalte="1">
    <Tabelle border-collapse="collapse" breite="42" padding="1mm" zeilenabstand="0mm" spaltenabstand="0pt" dehnen="max">
...

Is there a solution for that? The only workaround (i actually see) is to do a first pdf-generation without header/footer and a second run with different configuration to place header/footer outside the pagecontent.

Thanks in advance and kind regards!

pgundlach commented 9 years ago

ObjektAusgeben should respect the area (bereich="text").

Alterernatively you can use absolute positioning for the head (just use zeile="3cm" spalte="40mm" or similiar with ObjektAusgeben).

I im a hurry at the moment, please tell me if you need an example.

MDeutschmann-Imperia commented 9 years ago

My fault: It seems i didn't used both features in the right way... When i placed the header outside "Rand" before, the content dissappears (not rendered anymore). Know it work perfect in both ways. Thanks again!

pgundlach commented 9 years ago

If something disappears, it might be a bug. If you want, just open a new issue.