6

Apache-FOP 1.1 でレンダリングされた、複数のページにまたがる非常に長いテーブルがいくつかあります。

テーブルには、「表 7.6. 何かの詳細」などのキャプションと列ヘッダーがあります。

継続する各ページでは、列ヘッダーが上部で適切に繰り返されます。しかし、表の継続にも、「表 7.6. 何かの詳細 (続き)」という形式でキャプションを付ける必要があります。

XSL-FO と Apache-FOP でこれを行う方法はありますか? それとも、おそらく RenderX を介して利用可能な拡張機能が必要ですか?

4

1 に答える 1

6

FOP でそれを行う方法はわかりませんが、基本的な PDF 生成以外に FOP を使用したことがないためかもしれません。

RenderX (XEP)fo:table-headerを使用すると、継続ページで使用するタイトルを任意に設定fo:blockし、最初のタイトルに通常のタイトルを使用できます。

rx:table-omit-initial-header="true"その後、属性を使用してfo:table、テーブルが最初に出力されるときにテーブル ヘッダーを出力しないようにすることができます。

RenderX 4.18 でレンダリングされた例を次に示します...

例 XSL-FO

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" 
    xmlns:rx="http://www.renderx.com/XSL/Extensions">
    <fo:layout-master-set>
        <fo:simple-page-master master-name="my-page" page-width="8.5in" page-height="11in">
            <fo:region-body margin="1in" margin-top="1.5in" margin-bottom="1.5in"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="my-page">
        <fo:flow flow-name="xsl-region-body">
            <fo:block font-size="12pt" font-weight="bold" 
                text-align="center" space-after="6pt">Sample Table</fo:block>
            <fo:block>
                <fo:table rx:table-omit-initial-header="true" space-before=".08in">
                    <fo:table-column column-width="100%"/>
                    <fo:table-header>
                        <fo:table-cell>
                            <fo:block font-weight="bold"
                                font-size="12pt" text-align="center" 
                                space-after="6pt">Sample Table (Cont)</fo:block>
                        </fo:table-cell>
                    </fo:table-header>
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:table border-style="solid" border-width="1pt" padding="6pt">
                                    <fo:table-column column-number="1" column-width="20%"/>
                                    <fo:table-column column-number="2" column-width="80%"/>
                                    <fo:table-header font-weight="bold">
                                        <fo:table-cell text-align="left">
                                            <fo:block>Column 1</fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell>
                                            <fo:block>Column 2</fo:block>
                                        </fo:table-cell>
                                    </fo:table-header>
                                    <fo:table-body>
                                        <fo:table-row padding-before="20px">
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block>Lorem ipsum dolor sit amet</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
                                                    maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                    </fo:table-body>
                                </fo:table>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
            </fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>

PDF 出力ページ 1 の例

ここに画像の説明を入力

サンプル PDF 出力ページ 2

ここに画像の説明を入力

于 2012-12-18T07:33:17.700 に答える