3
votes

Currently I'm working with fop 1.1 in PDF generation by using xslt.

I've given border value as 1pt solid black. So that I'll Have Uniform thick border all around. But in actual it is not. Please Tell me the Solution for this.

<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>

Image Table with Different Border Thickness Even border value is solid 1pt black

1
No code, no screenshot, what do you expect from us ?Jean-François Savard
Now would you please provide the code so we can see what is incorrect ?Jean-François Savard

1 Answers

2
votes

That Output Change is due to the Adobe Reader Properties, not because of FOP or other XSLT Functionalities. To get the Original Border I've followed below Steps.

  1. Click On the Edit menu, click Preferences.
  2. Click Page Display in the list.
  3. Click the Smooth Text list and then click None.
  4. Uncheck the Smooth line art and Smooth images boxes