docbook-apps

  • 1.  Re: [docbook-apps] Generating font metrics requires Jakarta Commons Logging

    Posted 04-18-2007 22:39
    Hi,
    Actually, I have found that you don't need all of those jar file (although
    including them is not harmful). I can generate the metrics with this
    minimum set:

    java -cp "../fop-0.93/build/fop.jar;\
    ../fop-0.93/lib/commons-logging-1.0.4.jar" \
    ../fop-0.93/lib/commons-io-1.1.jar;\
    ../fop-0.93/lib/serializer-2.7.0.jar"\
    org.apache.fop.fonts.apps.TTFReader
    -enc ansi \
    /WINDOWS/FONTS/GARA.TTF lib/garamond.xml

    Bob Stayton
    Sagehill Enterprises
    DocBook Consulting
    bobs@sagehill.net


    ----- Original Message -----
    From: "T.G. Mutato" <throw6617@gmail.com>
    To: <docbook-apps@lists.oasis-open.org>
    Sent: Tuesday, April 17, 2007 2:14 PM
    Subject: [docbook-apps] Generating font metrics requires Jakarta Commons
    Logging


    > On a Win32 system, I've found with FOP 0.93 that the "Generate a FOP
    > font metrics file" instructions for FOP 0.20.5 in "DocBook XSL: The
    > Complete Guide" don't work "as is":
    >
    > java -cp "../fop-0.20.5/build/fop.jar;\
    > ../fop-0.20.5/lib/xercesImpl.jar;../fop-0.20.5/lib/xalan.jar" \
    > org.apache.fop.fonts.apps.TTFReader \
    > -enc ansi \
    > /WINDOWS/FONTS/GARA.TTF lib/garamond.xml
    >
    > Even when updating the directory names this produces the error:
    >
    > Exception in thread "main" java.lang.NoClassDefFoundError:
    > org/apache/commons/logging/LogFactory
    >
    > Adding the Commons Logging library, Commons IO library, and Serializer
    > library seems to resolve this. So updating the directory names and
    > version numbers and adding the new jar files gives us:
    >
    > java -cp "../fop-0.93/build/fop.jar;\
    > ../fop-0.93/lib/xercesImpl-2.7.1.jar;\
    > ../fop-0.93/lib/xalan-2.7.0.jar;\
    > ../fop-0.93/lib/commons-logging-1.0.4.jar" \
    > ../fop-0.93/lib/commons-io-1.1.jar;
    > ../fop-0.93/lib/serializer-2.7.0.jar
    > org.apache.fop.fonts.apps.TTFReader
    > -enc ansi \
    > /WINDOWS/FONTS/GARA.TTF lib/garamond.xml
    >
    > Just in case someone else finds this useful...
    >
    > TGM
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >
    >





  • 2.  Re: [docbook-apps] Generating font metrics requires Jakarta Commons Logging

    Posted 04-19-2007 11:53
    That's cool -- I didn't think to try to remove the xercesImpl and
    xalan jar files since they were originally required. BTW, I'm finding
    your book extremely useful Bob.

    TGM

    On 4/18/07, Bob Stayton <bobs@sagehill.net> wrote:
    > Hi,
    > Actually, I have found that you don't need all of those jar file (although
    > including them is not harmful). I can generate the metrics with this
    > minimum set:
    >
    > java -cp "../fop-0.93/build/fop.jar;\
    > ../fop-0.93/lib/commons-logging-1.0.4.jar" \
    > ../fop-0.93/lib/commons-io-1.1.jar;\
    > ../fop-0.93/lib/serializer-2.7.0.jar"\
    > org.apache.fop.fonts.apps.TTFReader
    > -enc ansi \
    > /WINDOWS/FONTS/GARA.TTF lib/garamond.xml
    >
    > Bob Stayton
    > Sagehill Enterprises
    > DocBook Consulting
    > bobs@sagehill.net
    >
    >
    > ----- Original Message -----
    > From: "T.G. Mutato" <throw6617@gmail.com>
    > To: <docbook-apps@lists.oasis-open.org>
    > Sent: Tuesday, April 17, 2007 2:14 PM
    > Subject: [docbook-apps] Generating font metrics requires Jakarta Commons
    > Logging
    >
    >
    > > On a Win32 system, I've found with FOP 0.93 that the "Generate a FOP
    > > font metrics file" instructions for FOP 0.20.5 in "DocBook XSL: The
    > > Complete Guide" don't work "as is":
    > >
    > > java -cp "../fop-0.20.5/build/fop.jar;\
    > > ../fop-0.20.5/lib/xercesImpl.jar;../fop-0.20.5/lib/xalan.jar" \
    > > org.apache.fop.fonts.apps.TTFReader \
    > > -enc ansi \
    > > /WINDOWS/FONTS/GARA.TTF lib/garamond.xml
    > >
    > > Even when updating the directory names this produces the error:
    > >
    > > Exception in thread "main" java.lang.NoClassDefFoundError:
    > > org/apache/commons/logging/LogFactory
    > >
    > > Adding the Commons Logging library, Commons IO library, and Serializer
    > > library seems to resolve this. So updating the directory names and
    > > version numbers and adding the new jar files gives us:
    > >
    > > java -cp "../fop-0.93/build/fop.jar;\
    > > ../fop-0.93/lib/xercesImpl-2.7.1.jar;\
    > > ../fop-0.93/lib/xalan-2.7.0.jar;\
    > > ../fop-0.93/lib/commons-logging-1.0.4.jar" \
    > > ../fop-0.93/lib/commons-io-1.1.jar;
    > > ../fop-0.93/lib/serializer-2.7.0.jar
    > > org.apache.fop.fonts.apps.TTFReader
    > > -enc ansi \
    > > /WINDOWS/FONTS/GARA.TTF lib/garamond.xml
    > >
    > > Just in case someone else finds this useful...
    > >
    > > TGM
    > >
    > > ---------------------------------------------------------------------
    > > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    > >
    > >
    > >
    >
    >
    >



  • 3.  Re: [docbook-apps] LINUX script : Generating font metrics requires Jakarta Commons Logging

    Posted 04-21-2007 12:53
    Hello,

    It's wrong in LINUX distribution ... So, i have put ":" in place where you
    put ";" !

    > java -cp "../fop-0.93/build/fop.jar;\
    > ../fop-0.93/lib/commons-logging-1.0.4.jar" \ why a "
    > ../fop-0.93/lib/commons-io-1.1.jar;\
    > ../fop-0.93/lib/serializer-2.7.0.jar"\
    > org.apache.fop.fonts.apps.TTFReader
    > -enc ansi \
    > /WINDOWS/FONTS/GARA.TTF lib/garamond.xml

    So :
    => java -cp "../fop-0.93/build/fop.jar:\
    ../fop-0.93/lib/commons-logging-1.0.4.jar: \
    ../fop-0.93/lib/commons-io-1.1.jar:\
    ../fop-0.93/lib/serializer-2.7.0.jar"\
    org.apache.fop.fonts.apps.TTFReader
    -enc ansi \
    GARA.TTF garamond.xml

    A BASH script :
    --------------------------------------
    #!/bin/bash

    JAVA=$(which java)

    SRC=/usr/local/src/fop-0.93/build
    SRCLIB=/usr/local/src/fop-0.93/lib

    FOP=/usr/local/src/fop-0.93/build/fop.jar
    XERCES=$SRCLIB/xercesImpl-2.7.1.jar
    XALAN=$SRCLIB/xalan-2.7.0.jar
    AVALON=$SRCLIB/avalon-framework.jar
    COMMONLOGIN=$SRCLIB/commons-logging-1.0.4.jar
    COMMONIO=$SRCLIB/commons-io-1.1.jar
    XMLAPIS=$SRCLIB/xml-apis.jar
    SERIALISER=$SRCLIB/serializer-2.7.0.jar

    if [ $# -eq 0 ]; then
    echo "For all 'ttf' file in $PWD";

    for file in *.ttf;
    do
    # echo $(basename $file .ttf)
    $JAVA -cp "$FOP:$XERCES:$XALAN:$COMMONLOGIN:$COMMONIO:$SERIALISER"
    org.apache.fop.fonts.apps.TTFReader -enc ansi $file $(basename
    $file .ttf).xml
    done

    elif [ $# -eq 2 ]; then
    $JAVA -cp "$FOP:$XERCES:$XALAN:$COMMONLOGIN:$COMMONIO:$SERIALISER"
    org.apache.fop.fonts.apps.TTFReader -enc ansi $1 $2
    else
    echo "Syntaxe : $0 font.ttf font.xml"
    echo "Syntaxe for all file : $0"
    fi
    --------------------------------------


    Best regards,
    Bruno

    --
    La science des projets consiste à prévenir les difficultés de l'exécution.
    Vauvenargues