xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Tremblay <paulhtremb...@gmail.com>
Subject Re: Default XSL Stylesheet for PDF?
Date Tue, 25 Oct 2011 20:04:25 GMT
On 10/25/11 5:09 AM, Jeffrey Walton wrote:
> On Tue, Oct 25, 2011 at 4:34 AM,<flattr.tomschr@online.ms>  wrote:
>> Hi Jeffrey,
>>
>> p, li { white-space: pre-wrap; }
>> On Tuesday 25 October 2011 Jeffrey Walton wrote:
>>> [...]
>>>> If you were curious the -xml input is used in conjunction with an XSLT
>>>> (thus the -xsl parameter) to transform said XML file to FO. There is
>>>> no "default" PDF stylesheet, this mechanism is merely a helper since a
>>>> lot of users create FO using a transform.
>>> OK. xalan also complains about a style sheet. These style sheets seem
>>> important.
>> They are not important, they are essential! :-)
> OK. Dumb user question: if they are so important, why does the tool
> have no default style sheet to use? I would expect it to set margins
> at 1.00 inch (or 2 centimeters), etc.
>
>> 1. Validate your DocBook XML file first
>> Do NOT skip this step! Use xmllint and run it like this:
>> $ xmllint --xinclude --postvalid --noout book.xml
>> If you encounter any problems, fix it. DO NOT processed further if you
>> encounter any errors. The other steps rely on a valid DocBook source.
>>
>> 2. Transform your DocBook XML file into FO
>> The FO file is an intermediate file which is read by your FO formatter.
>> I've already wrote about how to run xsltproc. See lines above.
> OK, thanks. I was not aware this was a multi-step process.
>
>> 3. Format the FO file
>> Now you take your FO file and feed it into the FO formatter:
>> $ fop book.fo book.pdf
> OK. See below :(
>
> $ xmllint --xinclude --postvalid --noout book.xml
> # No complaints
>
> $ xsltproc --xinclude
> http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
> book.xml>  book.fo
> # No complaints
>
> $ fop -fo book.fo -pdf book.pdf
> # All hell breaks loose
>
> Thanks for the help. It is greatly appreciated.
>
>
Woops. That stylesheet is not the main processing one. Try

xsltproc --xincludestyle 
http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl 
book.xml > book.fo

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message