- - PR -
PDF作成でページを跨る長い行を出力できない
1
投稿者 | 投稿内容 |
---|---|
|
投稿日時: 2008-01-08 16:14
皆さんはじめまして。
現在XSL-FOを使用してPDFを作成していますが、掲題の件で困っています。 PDFに表を出力したのですが、HTMLの様に ---------------------- | 行 | 行 2 | 行 3 | | |---------------- | | 行 2 | 行 3 | | |---------------- | | 行 2 | 行 3 | | |---------------- | | 行 2 | 行 3 | | |---------------- | | 行 2 | 行 3 | | |---------------- | | 行 2 | 行 3 | | |---------------- | | 行 2 | 行 3 | ---------------------- と"行"の項目を長くなるようにfo:table-cellのnumber-rows-spannedで値を設定しています。 この時に、"行"がページを跨るほど非常に長くなった場合に、以下のように出力されてしまいます。 1ページ目 ---------------------- | 行 | 行 2 | 行 3 | ------------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | 2ページ目 |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | |---------------- | 行 2 | 行 3 | ---------------------- と"行"の左側の線が無く、背景色などを指定していても有効になっていません。 前ページに長く続く"行"項目の線や背景色を有効にするにはどのようにすればよいでしょうか? よろしくお願いします。 [ メッセージ編集済み 編集者: ベル 編集日時 2008-01-08 16:41 ] |
|
投稿日時: 2008-01-09 18:21
ベルです。
その時に作成したFOファイルは下記になります ----------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="ja"> <fo:layout-master-set> <fo:simple-page-master margin-right="0.3in" margin-left="0.3in" page-width="8.5in" page-height="11in" master-name="default-page"> <fo:region-body margin-bottom="0.79in" margin-top="0.79in"/> <fo:region-after extent="0.79in"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence format="1" initial-page-number="1" master-reference="default-page"> <fo:static-content display-align="after" flow-name="xsl-region-after"> <fo:block> <fo:table space-after.optimum="2pt" space-before.optimum="1pt" table-layout="fixed" width="100%"> <fo:table-column/> <fo:table-body> <fo:table-row> <fo:table-cell border-color="white" border-width="1pt" border-style="solid" text-align="start" display-align="center" number-columns-spanned="2" height="30pt" padding-start="0pt" padding-end="0pt" padding-before="0pt" padding-after="0pt"> <fo:block/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-color="white" border-width="1pt" border-style="solid" text-align="start" display-align="center" number-columns-spanned="2" padding-start="0pt" padding-end="0pt" padding-before="0pt" padding-after="0pt"> <fo:block> <fo:block space-before.optimum="-8pt" color="black"> <fo:leader rule-thickness="1pt" leader-pattern="rule" leader-length="100%"/> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-color="white" border-width="1pt" border-style="solid" display-align="center" width="150pt" text-align="center" padding-start="0pt" padding-end="0pt" padding-before="0pt" padding-after="0pt" font-size="inherited-property-value('font-size') - 2pt"> <fo:block> <fo:inline font-weight="bold"> <fo:page-number font-weight="bold"/> </fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:block> </fo:block> <fo:block space-after.optimum="2pt" space-before.optimum="1pt" text-align="center"> <fo:block> <fo:inline font-size="22pt" font-family="MS UI Gothic" text-decoration="underline"> タイトル </fo:inline> </fo:block> </fo:block> <fo:block> </fo:block> <fo:block> <fo:table width="100%" table-layout="fixed"> <fo:table-column column-width="80pt"/> <fo:table-column/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block> <fo:inline font-size="8px" font-family="MS UI Gothic">概要</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block> <fo:inline font-size="8px" font-family="MS UI Gothic">作成日</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> <fo:block space-before.optimum="-8pt" color="black"> <fo:leader rule-thickness="1pt" leader-pattern="rule" leader-length="100%"/> </fo:block> <fo:block> <fo:leader leader-pattern="space"/> </fo:block> <fo:table table-layout="fixed" display-align="center"> <fo:table-column column-width="15mm"/> <fo:table-column column-width="15mm"/> <fo:table-column column-width="15mm"/> <fo:table-body> <fo:table-row>・・・(※) <fo:table-cell starts-row="true" ends-row="true" text-align="center" background-color="#598958" number-rows-spanned="100" border-style="solid" border-width="0.1mm"> <fo:block font-family="MS UI Gothic" font-size="6pt" wrap-option="wrap"> <fo:inline color="#FFFFFF" font-size="6pt" font-family="MS UI Gothic">行</fo:inline> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell text-align="center" background-color="#598958" border-style="solid" border-width="0.1mm"> <fo:block font-family="MS UI Gothic" font-size="6pt" wrap-option="wrap"> <fo:inline color="#FFFFFF" font-size="6pt" font-family="MS UI Gothic">行2</fo:inline> </fo:block> </fo:table-cell> <fo:table-cell text-align="center" background-color="#598958" border-style="solid" border-width="0.1mm"> <fo:block font-family="MS UI Gothic" font-size="6pt" wrap-option="wrap"> <fo:inline color="#FFFFFF" font-size="6pt" font-family="MS UI Gothic">行3</fo:inline> </fo:block> </fo:table-cell> </fo:table-row>・・・(※※) </fo:table-body> </fo:table> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> ----------------------------------------------------------------------------- 本当は(※)から(※※)までを100回繰り返しているが、スペース上1回だけにしました。 宜しくお願いします。 |
1