Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FOP 1.1 improper Border

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

like image 834
Vamsi Krishna DS Avatar asked Jul 11 '26 19:07

Vamsi Krishna DS


1 Answers

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
like image 88
Vamsi Krishna DS Avatar answered Jul 13 '26 21:07

Vamsi Krishna DS



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!