This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] A simple HowTo for customizing the pdf-output of an DocBook xml


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]