Announcement

Collapse
No announcement yet.

xsl-fo: tabelle am unteren Seitenrand

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • xsl-fo: tabelle am unteren Seitenrand

    Hallo,

    ich habe eine Tabelle mit verschiedenen Textblöcken. Diese ist als static content in der region-after definiert. Wenn nun aber mein region-body Inhalt z.B. nur die halbe Seite ausfüllt, ist die region after direkt dadrunter. Ich möchte aber gerne, dass sie immer am Seitenende ist. Was muss ich dafür tun?

    Vielen Dank schon mal für Unterstützung.

  • #2
    Das margin des Body setzen
    Christian

    Comment


    • #3
      Das habe ich gemacht.

      Element region_body = dom.createElement("fo:region-body");
      region_body.setAttribute("margin-bottom", "1cm");

      Damit wird ja der Abstand zum body gesetzt und wenn dessen Inhalt nur die Hälfte der Seite einnimmt, dann ist der Abstand zwar da, aber halt zum Inhalt und nicht zum body an sich?...denke ich ?!

      Muss ich dem Body sonst noch ne Breite/Höhe mitgeben? Sowie man das für simples-page-master macht (page-height, page-width) ?

      Comment


      • #4
        (Musste die spitzen Klammern entfernen)

        fo:simple-page-master master-name="pagetemplate"
        page-height="29.7cm"
        page-width="21cm"
        margin-top="1cm"
        margin-bottom="0.1cm"
        margin-left="0.8cm"
        margin-right="1.0cm"
        fo:region-body margin-top="2.5cm" margin-bottom="2.5cm"
        fo:region-before extent="2.0cm"
        fo:region-after extent="2.0cm"
        fo:simple-page-master
        Christian

        Comment


        • #5
          Außer extent habe ich alles genauso...muss ich auf region before auch extent machen?

          Comment


          • #6
            Da schlage ich folgendes vor:

            Du machst es und es geht -> ja
            du machst es und es geht nicht -> nein
            Christian

            Comment


            • #7
              Geht nicht....

              Comment


              • #8
                Dann wird ein anderer hier etwas zu beisteuern können...
                Christian

                Comment


                • #9
                  Ich hoffe es zumindestens..Aber trotzdem danke .

                  Comment


                  • #10
                    fo:region-body könnte an der falschen Stelle im DOM eingehängt sein (gehört vor fo:region-before und fo:region-after).

                    Comment


                    • #11
                      So sieht das aus:

                      <fo:simple-page-master page-width="21cm" page-height="29.7cm" master-name="MeinPdf" margin-top="3cm" margin-right="2cm" margin-left="2cm" margin-bottom="3cm"> <fo:region-body margin-top="1cm" margin-bottom="1cm" font-size="8pt" font-family="Arial"/>
                      <fo:region-after font-size="8pt" font-family="Arial" extent="2cm"/>
                      </fo:simple-page-master>

                      Ich habe kein region-before,weil ich es nicht benötige.

                      Comment


                      • #12
                        font-size und font-family sind bei den Regionen falsch platziert, probiere es so (ansonsten direkt bei fo:block):
                        [Highlight=XML]<?xml version="1.0" encoding="UTF-8"?>
                        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

                        <fo:layout-master-set>
                        <fo:simple-page-master page-width="21cm" page-height="29.7cm" master-name="MeinPdf"
                        margin-top="3cm" margin-right="2cm" margin-left="2cm" margin-bottom="3cm">
                        <fo:region-body margin-top="1cm" margin-bottom="1cm"/>
                        <fo:region-after extent="2cm"/>
                        </fo:simple-page-master>
                        </fo:layout-master-set>

                        <foage-sequence master-reference="MeinPdf">
                        <fo:static-content flow-name="xsl-region-after" font-size="8pt" font-family="Arial">
                        <fo:block>Text</fo:block>
                        </fo:static-content>

                        <fo:flow flow-name="xsl-region-body" font-size="8pt" font-family="Arial">
                        <fo:block>Text</fo:block>
                        </fo:flow>
                        </foage-sequence>

                        </fo:root>[/Highlight]
                        Wichtig ist auch die Reihenfolge von fo:static-content und fo:flow.

                        Comment


                        • #13
                          Mhh... Ich habe es jetzt genauso gemacht. wie du, aber trotzdem "klebt" die region after mitten auf der Seite.

                          Comment


                          • #14
                            Welcher Formatierer wird verwendet? Dieser Grundaufbau wird von allen mir bekannten umgesetzt.

                            Comment

                            Working...
                            X