FOP 1.1 不当边框

FOP 1.1 improper Border

目前我正在使用 xslt 在 PDF 生成中使用 fop 1.1。

我将边框值设置为 1pt 纯黑色。这样我周围就会有统一的粗边框。但实际上并非如此。请告诉我解决方案。

<fo:table table-layout="fixed" width="100%">

                        <fo:table-column column-number="1" column-width="10%" />
                        <fo:table-column column-number="2" column-width="40%" />
                        <fo:table-column column-number="3" column-width="10%" />
                        <fo:table-column column-number="4" column-width="20%" />
                        <fo:table-column column-number="5" column-width="20%" />

                        <!-- Table Header -->
                        <fo:table-header>
                            <fo:table-row>
                                <fo:table-cell column-number="1" border-top="solid 1pt black"
                                    border-left="solid 1pt black" border-bottom="solid 1pt black">
                                    <fo:block line-height="7pt" orphans="2" margin-top="3pt"
                                        margin-bottom="3pt" font-size="6pt" text-align="center"
                                        widows="2">
                                        Item
                                    </fo:block>
                                </fo:table-cell>

                                <fo:table-cell column-number="2" border-top="solid 1pt black"
                                    border-left="solid 1pt black" border-bottom="solid 1pt black">
                                    <fo:block line-height="7pt" orphans="2" margin-top="3pt"
                                        margin-bottom="3pt" font-size="6pt" text-align="center"
                                        widows="2">Commodity
                                        &amp;
                                        Description
                                    </fo:block>
                                </fo:table-cell>

                                <fo:table-cell column-number="3" border-top="solid 1pt black"
                                    border-left="solid 1pt black" border-bottom="solid 1pt black">
                                    <fo:block line-height="7pt" orphans="2" margin-top="3pt"
                                        margin-bottom="3pt" font-size="6pt" text-align="center"
                                        widows="2">
                                        Quantity
                                    </fo:block>
                                </fo:table-cell>

                                <fo:table-cell column-number="4" border-top="solid 1pt black"
                                    border-left="solid 1pt black" border-bottom="solid 1pt black">
                                    <fo:block line-height="7pt" orphans="2" margin-top="3pt"
                                        margin-bottom="3pt" font-size="6pt" text-align="center"
                                        widows="2">
                                        Unit Price
                                    </fo:block>
                                </fo:table-cell>

                                <fo:table-cell column-number="5" border-top="solid 1pt black"
                                    border-left="solid 1pt black" border-right="solid 1pt black"
                                    border-bottom="solid 1pt black">
                                    <fo:block line-height="7pt" orphans="2" margin-top="3pt"
                                        margin-bottom="3pt" font-size="6pt" text-align="center"
                                        widows="2">
                                        Amount
                                    </fo:block>
                                </fo:table-cell>
                            </fo:table-row>

                        </fo:table-header>

                        <fo:table-body>

                        <fo:table-row>
                                    <fo:table-cell column-number="1" border-left="solid 1pt black" height="1pt">
                                        <fo:block line-height="8pt" orphans="2" margin-left="10pt"
                                            font-family="Courier New" font-size="8pt" text-align="center"
                                            widows="2">
                                        </fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell column-number="2" border-left="solid 1pt black" height="1pt">
                                        <fo:block line-height="8pt" orphans="2" margin-left="3pt"
                                            font-family="Courier New" font-size="8pt" text-align="start"
                                            widows="2">
                                        </fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell column-number="3" border-left="solid 1pt black" height="1pt">
                                        <fo:block line-height="8pt" orphans="2" margin-left="10pt"
                                            font-family="Courier New" font-size="8pt" text-align="center"
                                            widows="2">
                                        </fo:block>
                                    </fo:table-cell>

                                    <fo:table-cell column-number="4" border-left="solid 1pt black" height="1pt">
                                        <fo:block line-height="8pt" orphans="2" margin-left="10pt"
                                            font-family="Courier New" font-size="8pt" text-align="left"
                                            widows="2">
                                        </fo:block>
                                    </fo:table-cell>

                                    <fo:table-cell column-number="5" border-right="solid 1pt black" height="1pt"
                                        border-left="solid 1pt black">
                                        <fo:block line-height="8pt" orphans="2" margin-left="10pt"
                                            font-family="Courier New" font-size="8pt" text-align="center"
                                            widows="2">
                                        </fo:block>
                                    </fo:table-cell>
                                </fo:table-row>
                            <xsl:for-each select="unitDetail">


                                <fo:table-row>
                                    <fo:table-cell column-number="1" height="8pt"
                                        border-left="solid 1pt black">
                                        <fo:block line-height="8pt" orphans="2" margin-left="10pt"
                                            font-family="Courier New" font-size="8pt" text-align="center"
                                            widows="2">
                                            <xsl:value-of select="item" />
                                        </fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell column-number="2" border-left="solid 1pt black"
                                        height="8pt">
                                        <fo:block line-height="8pt" orphans="2" margin-left="3pt"
                                            font-family="Courier New" font-size="8pt" text-align="start"
                                            widows="2">
                                            <xsl:value-of select="description" />
                                        </fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell column-number="3" border-left="solid 1pt black"
                                        height="8pt">
                                        <fo:block line-height="8pt" orphans="2" margin-left="10pt"
                                            font-family="Courier New" font-size="8pt" text-align="center"
                                            widows="2">
                                            <xsl:value-of select="quantity" />
                                        </fo:block>
                                    </fo:table-cell>

                                    <fo:table-cell column-number="4" border-left="solid 1pt black"
                                        height="8pt">
                                        <fo:block line-height="8pt" orphans="2" margin-left="10pt"
                                            font-family="Courier New" font-size="8pt" text-align="left"
                                            widows="2">
                                            <xsl:value-of select="unitPrice" />
                                        </fo:block>
                                    </fo:table-cell>

                                    <fo:table-cell column-number="5" border-right="solid 1pt black"
                                        border-left="solid 1pt black" height="8pt">
                                        <fo:block line-height="8pt" orphans="2" margin-left="10pt"
                                            font-family="Courier New" font-size="8pt" text-align="center"
                                            widows="2">
                                            <xsl:value-of select="amount" />
                                        </fo:block>
                                    </fo:table-cell>
                                </fo:table-row>
                            </xsl:for-each>
                        </fo:table-body>
                    </fo:table>

Table 具有不同的边框粗细 即使边框值为 solid 1pt black

输出更改是由于 Adob​​e Reader 属性,而不是因为 FOP 或其他 XSLT 功能。要获得原始边框,我已按照以下步骤操作。

  1. 单击“编辑”菜单上的“首选项”。
  2. 单击列表中的页面显示。
  3. 单击平滑文本列表,然后单击 None
  4. 取消选中平滑线条艺术和平滑图像框