OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Noob: Python DocBook to PDF


Hi Chris.

Michael, just to add a little to what Chris has said.

Christopher R. Maden wrote:
> On Mon, 2007-09-03 at 17:33 -0500, Michael Hipp wrote:
>> I'm writing an application in Python that needs to produce reports and 
>> printouts. DocBook seems like a great starting point for defining the 
>> layouts.
>>
>> For better or worse, PDF seems like the way to send printouts to the 
>> printer. Are there any other options (when starting from DocBook)?
>>
>> Using Python, how do I get from my DocBook XML XSLT files to PDF?


Generally the way to go would be to generate XML valid to the Docbook 
DTD and then use the provided XSLT stylesheets to convert to xsl-fo,
then use a commercial xsl engine or fop to get to PDF or PS.
4suite provides a good Python library to generate the XML if needed.

> But let’s back up a bit: DocBook isn’t really good for “defining
> layouts.”  It’s good for describing the semantics of techpubs (and some
> other textual information).  It may be able to represent your reports,
> but if all you want is PDF, DocBook may be an unnecessary diversion.
> 

> However, FOP is written in Java, not Python.  

Are you OK to use other languages for some of the steps?

> 
> In short, you need to better define your problem, and not presume that
> DocBook or XML are necessarily going to be part of the solution.


This is more important, rather than you wasting time? What constraints
are you working under, if any?



regards

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]