Re: fop - titled border

Shawn,

if your question is about Apache FOP, as the subject suggests, then
it is an implementation specific question and should be asked on FOP
lists.

If you are asking about XSL Formatting Objects (http://www.w3.org/TR/xsl), 
then it is easy.

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="my-page">
      <fo:region-body border="thin solid blue" margin-left="1in" margin-right="1in" margin-top="1in"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="my-page">
    <fo:flow flow-name="xsl-region-body">
      <fo:block space-before="48pt" start-indent="24pt" end-indent="24pt" space-before.conditionality="retain" border="thick solid black"> 
	<fo:block padding-before="-24pt" font-size="32pt" font-weight="bold" text-indent="48pt">
	  <fo:inline background-color="white">Border Title</fo:inline>
	</fo:block>
	<fo:block font-size="24pt">This text has a title, and the title is placed on the border of the framed block
	 that surrounds the text.
        </fo:block>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Tested with RenderX XEP (http://xep.xattic.com/). Formatting result is attached.

David Tolpin

> I am trying to create a Titled Border, which displays text inset within the border,
> such as:
> 
> --- Border Title --------------
> |                             |
> -------------------------------
> 
> I was unable to find this border style when searching around. Does anyone know of a
> way to accomplish this type of border?

Received on Monday, 4 August 2003 02:11:22 UTC