RE: [xsl] Table border issue

Subject: RE: [xsl] Table border issue
From: "Chaudhary, Harsh" <HCHAUDHA@xxxxxxxxx>
Date: Thu, 14 Dec 2006 09:18:06 -0600
I was hoping that this is a common issue for many people or that I was
using the wrong attribute or maybe missing something.

I am using Xalan to convert an XML file to pdf rendered for display
using Adobe Acrobat. Here's a snippet of my code:

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

    <fo:layout-master-set>
        <!--SUMMARY PAGE SIMPLE PAGE MASTER -->
        <fo:simple-page-master master-name="SummaryPage"
page-height="21cm" page-width="29.7cm" margin-top="0.10in"
margin-bottom="0.05in" margin-left="0.50in" margin-right="0.50in">

            <fo:region-body margin-top="15mm" margin-bottom="15mm"/>
            <fo:region-after extent="13mm" precedence="true"/>
        </fo:simple-page-master>
    </fo:layout-master-set>

    <fo:page-sequence master-reference="SummaryPage"
initial-page-number="auto">
        <fo:flow flow-name="xsl-region-body">

<!-- TABLE STUFF STARTS HERE -->

            <fo:block space-before="15pt">
                <fo:table border="0.5pt solid black">
                    <fo:table-column column-width="100mm"/>
                    <fo:table-column column-width="170mm"/>

                    <fo:table-header background-color="gray">
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block font-weight="bold">Your
Summary Information</fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-header>


                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block font-weight="bold"
font-size="11pt">Report Type: Estimate</fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block font-weight="bold"
font-size="11pt">Source Date for Calculations: Today's Date,
mm/dd/yyyy</fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
            </fo:block>

Hope that helps clarify what I meant.

HC.

-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@xxxxxxxx]
Sent: Wednesday, December 13, 2006 5:06 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Table border issue


Chaudhary, Harsh wrote:
> I have a table and for its header, the code is:
>
> <fo:table-header background-color="gray" border="0.5pt solid black">
>
> I want a 0.5pt border around the header. It is working fine for the
top
> and bottom border but, on the left and right sides, its like the
border
> is 1pt width? I would appreciate any suggestions.

There are half a zillion possibilities. First, what FO processor
are you using? It might have some restrictions. Second, how do you
asses the border width in the rendered document? What format do
you use for result document? What tool do you use to display or
print it? It is known that severe rounding errors may be introduced
in the process.

J.Pietschmann

Current Thread