You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Marcus Andersson <ma...@home.se> on 2003/04/03 20:00:52 UTC

Border widths

Hello

First of all: I am using FOP-0.20.4 under jdk1.4.1. 

I want to do headers that has a different background-color than the rest of the document and it should also be framed by a thin border (1px wide if you would do it in html and css). The problem is that when I use the same border-width in different contexts then the borders sometimes are rendered so it looks like the borders have different width. Is there a magic trick that one can use to get the same rendered border-width or should I just use the same border-width and hope for the best?

Regards

/Marcus

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Border widths

Posted by Marcus Andersson <ma...@home.se>.
I'm using pt and mm in my source. The pixel measurement was just a comparison with html.

But I'll try to print out and see what happens. Thanks for the tip

/Marcus
----- Original Message ----- 
From: "J.Pietschmann" <j3...@yahoo.de>
To: <fo...@xml.apache.org>
Sent: Friday, April 04, 2003 12:03 AM
Subject: Re: Border widths


> Marcus Andersson wrote:
> > I want to do headers that has a different background-color than the rest of
> > the document and it should also be framed by a thin border (1px wide if you
> > would do it in html and css). The problem is that when I use the same
> > border-width in different contexts then the borders sometimes are rendered so
> > it looks like the borders have different width. Is there a magic trick that
> > one can use to get the same rendered border-width or should I just use the
> > same border-width and hope for the best?
> 
> PDF doesn't have pixels. Use mm, in or pt or a relative measurement.
> Acrobat Reader appears to round off line widths heavily, borders and
> other lines with the same width in the source may appear with wildly
> different width on the screen. Make a test printout on a good laser
> to see whether something is really wrong.
> 
> J.Pietschmann
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Border widths

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Marcus Andersson wrote:
> I want to do headers that has a different background-color than the rest of
> the document and it should also be framed by a thin border (1px wide if you
> would do it in html and css). The problem is that when I use the same
> border-width in different contexts then the borders sometimes are rendered so
> it looks like the borders have different width. Is there a magic trick that
> one can use to get the same rendered border-width or should I just use the
> same border-width and hope for the best?

PDF doesn't have pixels. Use mm, in or pt or a relative measurement.
Acrobat Reader appears to round off line widths heavily, borders and
other lines with the same width in the source may appear with wildly
different width on the screen. Make a test printout on a good laser
to see whether something is really wrong.

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Border widths

Posted by Clay Leeds <cl...@medata.com>.
Marcus,

Marcus Andersson wrote:
> Hello
> 
> First of all: I am using FOP-0.20.4 under jdk1.4.1. 
> 
> I want to do headers that has a different background-color than the rest of the document and it should also be framed by a thin border (1px wide if you would do it in html and css). The problem is that when I use the same border-width in different contexts then the borders sometimes are rendered so it looks like the borders have different width. Is there a magic trick that one can use to get the same rendered border-width or should I just use the same border-width and hope for the best?

Here's what I have for table-headers on an 8-columned table. Hope this
helps!

<fo:table border="0pt" table-layout="fixed">
  <fo:table-column column-width="2.1cm"/>
  <fo:table-column column-width="7.2cm"/>
  <fo:table-column column-width="1.1cm"/>
  <fo:table-column column-width="1cm"/>
  <fo:table-column column-width="2cm"/>
  <fo:table-column column-width="2cm"/>
  <fo:table-column column-width="2cm"/>
  <fo:table-column column-width="2.6cm"/>
  <fo:table-header>
    <fo:table-row>
      <fo:table-cell number-columns-spanned="8">
        <!-- extra spacing above top of table -->
        <fo:block padding="0pt" font-size="2pt">
          &#160;
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
    <fo:table-row padding-bottom="1pt" padding-top="1pt"
bakcground-color="#dddddd">
      <fo:table-cell text-align="center">
        <fo:block font-weight="bold" padding-top="1pt" padding-bottom="1pt">
          <fo:inline>Date</fo:inline>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell text-align="start">
        <fo:block font-weight="bold" padding-top="1pt" padding-bottom="1pt">
          <fo:inline>Service &amp; Description</fo:inline>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell text-align="center">
        <fo:block font-weight="bold" padding-top="1pt" padding-bottom="1pt">
          <fo:inline>Mods</fo:inline>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell text-align="center">
        <fo:block font-weight="bold" padding-top="1pt" padding-bottom="1pt">
          <fo:inline>Qty</fo:inline>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell text-align="end">
        <fo:block font-weight="bold" padding-top="1pt" padding-bottom="1pt">
          <fo:inline>Charge</fo:inline>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell text-align="end">
        <fo:block font-weight="bold" padding-top="1pt" padding-bottom="1pt">
          <fo:inline>Reduction</fo:inline>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell text-align="right">
        <fo:block font-weight="bold" padding-top="1pt" padding-bottom="1pt">
          <fo:inline>Allowance</fo:inline>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell text-align="center" padding-left="4pt">
        <fo:block font-weight="bold" padding-top="1pt" padding-bottom="1pt">
          <fo:inline>Reasons</fo:inline>
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
    <fo:table-row>
      <fo:table-cell border-top="1pt solid #000000"
number-columns-spanned="8">
        <!-- line demarking bottom of table-header -->
        <fo:block padding="0pt" font-size="1pt">
          &#160;
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
  </fo:table-header>


-- 
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org