This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] A simple HowTo for customizing the pdf-output of an DocBook xml
- From: Bob Stayton <bobs at sco dot com>
- To: jochen dot gerstl at de dot abb dot com
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Tue, 26 Aug 2003 09:22:10 -0700
- Subject: Re: [docbook-apps] A simple HowTo for customizing the pdf-output of an DocBook xml
- References: <OF6D995C5E.8B33D3DD-ONC1256D8E.005320C6@de.abb.com>
On Tue, Aug 26, 2003 at 05:31:52PM +0200, jochen.gerstl@de.abb.com wrote:
>
> Hello to all,
>
> I have written a small set of books, with a few chapters an sections.
>
> I am able to transform that xml to HTML, and chunked HTML. With chunked
> HTML I could modify the header as well as the footer :-)
>
> I was also luky to transform the xml to xml-fo going on to pdf. (I'am using
> Xalan and FOP)
>
> As PDF result I get an more or less empty page for the <set>, as well as
> for the <book>. How can I design this pages ? I would like to have a
> graphic printed over a part of the page.
>
> Also I would like to have an Header, with our company logo, and a footer on
> each page of the pdf-file. How can I manage this ?
>
> I tried to find out an solution by reading in <DocBook XSL The Complete
> Guide>, but I am not able to put all the information I get there together.
>
> So at the moment I only have the customization layer for the pdf (more
> exactly for the xml-fo) started, and now I do not understand what to write
> when where to get an Header and a footer. Where to enter what to get an
> picture on the title page?
>
> May be that someone of you can give me a hint. I'am very new with DocBook,
> XML, XSL and java.
For customizing a header, copy this template from
fo/pagesetup.xsl to your customization layer:
<xsl:template name="header.content">
...
</xsl:template>
Then modify it to put the information you want to see
in each location of the header, using the examples
in the existing template.
Do the same for the template named 'footer.content'.
To add a graphic to a header or footer, the content
output by either template should be something like:
<fo:external-graphic src="path/to/graphics/file"/>
For adding something to a title page, you need to:
1. Create a customized title page specification file.
Copy fo/titlepage.templates.xml to another location
and edit it.
2. Process the new spec file with the special stylesheet
template/titlepage.xsl that generates a title page
stylesheet file.
3. Include the generated title page stylesheet file in
your customization layer. Your customization layer
should have a line like:
<xsl:include href="mytitlepage.templates.xsl"/>
These steps are described in
http://www.sagehill.net/docbookxsl/TitlePagePrint.html
including an example of adding a graphic to a title page.
Hope this helps. DocBook does have a significant
learning curve.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org