[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] pdf output
Jason,
There are several problems using both FOP and PassiveTeX for PDF
formatting of Docbook. Using either tool will result in some odd format
errors, depending on what you're formatting. My experience is that if
you have simple needs, and relatively short documents, then FOP will
suffice. However, if you are prepared to work around some of
PassiveTex's formatting issues (by modifying the XSL, the PassiveTeX
macros, or the Docbook source) then a much better-looking output file
will result. Personally, although I've had to work around a lot of
issues with PassiveTeX, I much prefer its output to that of FOP. Over
time, that opinion may change as FOP becomes a better product.
When formatting tables, it's helpful to know that cell and row spanning
don't work so well in PassiveTeX, and neither do relative column
widths. Simple tables, however, can be fairly easily accomplished, by
not using spans, and by specifying absolute table widths. If you have
border issues, then those can be worked around too, with a little
trickery. Here is an example of a simple table in one of the PDF
documents that my organization produces:
<table frame='all'><title>Namespaces</title>
<tgroup cols='4' align='left'>
<!-- Note the 2 extra 0-width columns to generate a frame properly,
and absolute column widths -->
<colspec colname='c0' colwidth="0pt"/>
<colspec colname='c1' colwidth="1in"/>
<colspec colname='c2' colwidth="3in"/>
<colspec colname='c3' colwidth="0pt"/>
<thead>
<row>
<entry namest="c1" align="left">Prefix</entry>
<entry namest="c2" align="left">Namespace</entry>
</row>
</thead>
<tbody>
<row>
<entry namest="c1" align="left">sec</entry>
<entry namest="c2" align="left">urn:liberty:sec:2003-08</entry>
</row>
<row>
<entry namest="c1" align="left">sb</entry>
<entry namest="c2"
align="left">urn:liberty:soap-bind:2003-05</entry>
</row>
<row>
<entry namest="c1" align="left">disco</entry>
<entry namest="c2" align="left">urn:liberty:disco:2003-08</entry>
</row>
<row>
<entry namest="c1" align="left">ac</entry>
<entry namest="c2" align="left">urn:liberty:ac:2003-08</entry>
</row>
<row>
<entry namest="c1" align="left">lib</entry>
<entry namest="c2" align="left">urn:liberty:iff:2003-08</entry>
</row>
<row>
<entry namest="c1" align="left">md</entry>
<entry namest="c2"
align="left">urn:liberty:metadata:2003-08</entry>
</row>
<row>
<entry namest="c1" align="left">saml</entry>
<entry namest="c2"
align="left">urn:oasis:names:tc:SAML:1.0:assertion</entry>
</row>
<row>
<entry namest="c1" align="left">S</entry>
<entry namest="c2"
align="left">http://www.w3.org/2002/12/soap-envelope</entry>
</row>
<row>
<entry namest="c1" align="left">ds</entry>
<entry namest="c2"
align="left">http://www.w3.org/2000/09/xmldsig#</entry>
</row>
<row>
<entry namest="c1" align="left">xenc</entry>
<entry namest="c2"
align="left">http://www.w3.org/2001/04/xmlenc#</entry>
</row>
<row>
<entry namest="c1" align="left">wsse:</entry>
<entry namest="c2"
align="left">http://schemas.xmlsoap.org/ws/2002/xx/secext</entry>
</row>
<row>
<entry namest="c1" align="left">xs</entry>
<entry namest="c2"
align="left">http://www.w3.org/2001/XMLSchema</entry>
</row>
<row>
<entry namest="c1" align="left">xsi</entry>
<entry namest="c2"
align="left">http://www.w3.org/2001/XMLSchema-instance</entry>
</row>
</tbody>
</tgroup>
</table>
It should also be noted that it is possible to avoid the use of tables
for many cases in FO-generated output, as FO provides several other
formatting options for cases that would require a table in HTML, so you
may want to investigate using FO block-level formatting (of things such
as variablelist for example) to see if that would meet your needs in
this case.
Cheers,
- JohnK
______________________________________
John Kemp john.kemp@earthlink.net
t: 413.458.9053 f: 413.458.0951
Co-ordinating editor / Project Liberty
On Tuesday, Sep 2, 2003, at 00:42 US/Eastern, Bob Stayton wrote:
> On Tue, Sep 02, 2003 at 02:54:36PM +1000, Jason Lewis wrote:
>> Hi,
>>
>> I am trying to write a document in docbook, but I'm having some
>> trouble
>> getting the tables to generate properly when output to PDF.
>>
>> I use the following command to generate an .fo file
>>
>> xsltproc --xinclude -o /var/www/catalogue/
>> /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl
>> catalogue.sgml
>
> I think you pasted the wrong command line into your
> mail. This command uses the HTML chunking stylesheet,
> and won't produce FO output.
>
>> and then i run pdfxmltex on the fo file to produce a pdf.
>>
>> The problem i am having is with how the tables in my document are
>> rendered in
>> the PDF. It seems to ignore all the directives i give it regarding
>> text
>> alignment within the cell and also the cell and frame border
>> thicknesses.
>>
>> I'm using docbook 4.2
>>
>> Is there known problems with generating tables in pdfs?
>
> PassiveTeX does have problems formatting tables properly.
> See:
>
> http://sources.redhat.com/ml/docbook-apps/2002-q3/msg00817.html
>
> You might be better off using FOP instead.
>
> --
>
> 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 from this list, send a post to
> docbook-apps-unsubscribe@lists.oasis-open.org.
>
>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]