logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yuji Kumasaka <kumas...@mms.intec.co.jp>
Subject Re: [PATCH] ant task for manual create
Date Thu, 18 Oct 2001 02:16:47 GMT
Hi, Ceki.


Thanks, commit to CVS.

On Wed, 17 Oct 2001 23:17:18 +0200
Ceki G・c・<cgu@qos.ch> wrote:
>
> ps: Would you know how to generate PDF as well?
>

Maybe, DocBook -> PDF translation need 2 step.

1. DocBook -> xls:fo
2. xsl:fo  -> PDF

But, it is not work yet.
Does anyone know how to work fine ?

following description, I try it.

1. DocBook -> xls:fo

1-1. DocBook -> xls:fo translation

 add following target to build.xml in the ./src/doc/docbook directory.

  <!-- ================= BUILD: XML-PDF Generation ======================= -->
  <target name="pdf">

    <!-- Top Level Directory -->
    <style basedir="."
           destdir="${doc.build}/${doc.name}"
         extension=".fo"
             style="docbook-xsl-1.45/fo/docbook.xsl"
          excludes="build.xml"
          includes="manual.xml">
    </style>

  </target>

1-2. Run ant target pdf

$ ant pdf

It is generate manual.fo file in the ./build/manual/ directory.
But, currently occured following errors.

    [style] file:///E:/jakarta-log4j-1.2alpha2/src/docbook/docbook-xsl-1.45/fo/d
ocbook.xsl; Line 92; Column 16; Making portrait pages on USletter paper (8.5inx1
1in)
    [style] file:///E:/jakarta-log4j-1.2alpha2/src/docbook/docbook-xsl-1.45/fo/d
ocbook.xsl; Line 72; Column 16; title encountered, but no template matches.
    [style] file:///E:/jakarta-log4j-1.2alpha2/src/docbook/docbook-xsl-1.45/fo/d
ocbook.xsl; Line 72; Column 16; title encountered, but no template matches.
    [style] file:///E:/jakarta-log4j-1.2alpha2/src/docbook/docbook-xsl-1.45/fo/d
ocbook.xsl; Line 72; Column 16; title encountered, but no template matches.
    [style] file:///E:/jakarta-log4j-1.2alpha2/src/docbook/docbook-xsl-1.45/fo/d
ocbook.xsl; Line 72; Column 16; title encountered, but no template matches.
    [style] file:///E:/jakarta-log4j-1.2alpha2/src/docbook/docbook-xsl-1.45/fo/d
ocbook.xsl; Line 72; Column 16; title encountered, but no template matches.
    [style] file:///E:/jakarta-log4j-1.2alpha2/src/docbook/docbook-xsl-1.45/fo/d
ocbook.xsl; Line 72; Column 16; title encountered, but no template matches.



2. xsl:fo -> PDF translation

  Use FOP project ((http://xml.apache.org/fop/index.html) fop command.

2-1. 
  Download it above site. And unpack distribution.

 ./Fop-0.20.1/

 You can find fop.bat or fop.sh.

 fop command usage

-----------
USAGE
Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-pcl|-ps|-txt|-at|-p
rint] <outfile>
 [OPTIONS]
  -d          debug mode
  -x          dump configuration settings
  -q          quiet mode
  -c cfg.xml  use additional configuration file cfg.xml
  -l lang     the language to use for user information
  -s          for area tree XML, down to block areas only

 [INPUT]
  infile            xsl:fo input file (the same as the next)
  -fo  infile       xsl:fo input file
  -xml infile       xml input file, must be used together with -xsl
  -xsl stylesheet   xslt stylesheet

 [OUTPUT]
  outfile           input will be rendered as pdf file into outfile
  -pdf outfile      input will be rendered as pdf file (outfile req'd)
  -awt              input will be displayed on screen
  -mif outfile      input will be rendered as mif file (outfile req'd)
  -pcl outfile      input will be rendered as pcl file (outfile req'd)
  -ps outfile       input will be rendered as PostScript file (outfile req'd)
  -txt outfile      input will be rendered as text file (outfile req'd)
  -at outfile       representation of area tree as XML (outfile req'd)
  -print            input file will be rendered and sent to the printer
                    see options with "-print help"

 [Examples]
  Fop foo.fo foo.pdf
  Fop -fo foo.fo -pdf foo.pdf (does the same as the previous line)
  Fop -xsl foo.xsl -xml foo.xml -pdf foo.pdf
  Fop foo.fo -mif foo.mif
  Fop foo.fo -print or Fop -print foo.fo
  Fop foo.fo -awt
------------------


2-2. use fop command for translation

  Sorry, I try it, but encount an error. 


$ fop.bat manual.fo manual.pdf

e:\Fop-0.20.1>java -cp build\fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\xerce
s-1.2.3.jar;lib\jimi-1.0.jar org.apache.fop.apps.Fop manual.fo manual.pdf

FOP 0.20.1
using SAX parser org.apache.xerces.parsers.SAXParser
building formatting object tree
setting up fonts
 [1] [2] [3]
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
 [4] [5]
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
 [6]
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
Warning: property - "last-line-end-indent" is not implemented yet.
 [7]
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
 [1] [2] [3]
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
 [4] [5This element "fo:table-and-caption" is not yet implemented.
This element "fo:table-and-caption" is not yet implemented.
This element "fo:table-and-caption" is not yet implemented.
This element "fo:table-and-caption" is not yet implemented.
] [6] [7] [8] [9This element "fo:table-and-caption" is not yet implemented.
] [10] [11] [12]
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
 [13] [14] [15] [16] [17] [18] [19] [20]
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
 [21] [22] [23] [24] [25] [26]
 [27>] [28]
Warning: property - "linefeed-treatment" is not implemented yet.
 [29] [30]
 [31]
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
Warning: property - "linefeed-treatment" is not implemented yet.
 [32] [33] [34ERROR: The id "N400A27" already exists in this document



ps.

 BTW, I found out that fop have option -xml and -xsl.
 Is it possible to translate DocBook -> xml:fo -> PDF go on one step ?
 or Java command maybe merge to Ant task.



-- 
Yuji Kumasaka <kumasaka@mms.intec.co.jp>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Mime
View raw message