Although we have text appearing, I'd like to resolve the issue of
using the latest FOP in batik; using standard Batik 1.7 results in ALL
text being transcoded as paths!

I've always had difficulties understanding Java's concept of
Classpath, so please excuse me! The doc. for using
batik-rasterizer.jar instructs you to cd to the directory containing
the jar and execute the "java -jar batik-rasterizer..." command from
there. Even with an empty CLASSPATH, the jar manages to find other
jars in the lib directory below, so it must be hard-coded, surely?

Anyway, I tried this

export CLASSPATH=/usr/local/batik-1.7/lib:$CLASSPATH; java -jar ...

and

java -cp /usr/local/batik-1.7/lib java -jar ...

Neither worked, in that neither cured the original exception:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/xmlgraphics/image/loader/ImageContext
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:164)
       at 
org.apache.batik.apps.rasterizer.DestinationType.getTranscoder(DestinationType.java:96)
       at 
org.apache.batik.apps.rasterizer.SVGConverter.execute(SVGConverter.java:690)
       at org.apache.batik.apps.rasterizer.Main.execute(Main.java:938)
       at org.apache.batik.apps.rasterizer.Main.main(Main.java:992)

Any ideas would be welcome!

Martin

2008/11/15 Jeremias Maerki <[EMAIL PROTECTED]>:
> On 14.11.2008 17:03:53 Martin Jacobson wrote:
>> It seems to be getting worse, not better :-(
>>
>> putting the xmlgraphics-commons.jar into the class path did not help.
>
> What does that mean? The log output you posted below?
>
>> I modified the fop 0.95 build.xml as follows...
>>
>> (all in one jar patternset)
>>         <!-- next line replaced by following MJ 14/11/2008 -->
>>         <!--include name="org/apache/xmlgraphics/util/io/**"/-->
>>         <include name="org/apache/xmlgraphics/util/**"/>
>>         <!-- next line added by MJ 14/11/2008 -->
>>         <include name="org/apache/xmlgraphics/image/**"/>
>
> Well, that was not the idea. And it will also not work as you lose the
> registrations of the default plug-ins of the image loading framework
> (See META-INF/services directory in the JAR). You should really put
> xmlgraphics-commons.jar from FOP's lib directory in the classpath
> instead of changing the build.
>
>> This jar, when copied as before, produced a load of errors, as below...
>> ...
>> ov 14, 2008 3:18:48 PM org.apache.fop.fonts.autodetect.FontInfoFinder find
>> SEVERE: Unable to load font file: file:/System/Library/Fonts/????.ttf.
>> Reason: TrueType font is not supported:
>> file:/System/Library/Fonts/????.ttf
>> Nov 14, 2008 3:18:48 PM org.apache.fop.fonts.truetype.TTFFile readCMAP
>> SEVERE: Unsupported TrueType font: Unicode cmap table not present. Aborting
>> Nov 14, 2008 3:18:48 PM org.apache.fop.fonts.autodetect.FontInfoFinder find
>> SEVERE: Unable to load font file: file:/System/Library/Fonts/????.ttf.
>> Reason: TrueType font is not supported:
>> file:/System/Library/Fonts/????.ttf
>> ...
>> success
>
> Most of that is normal. FOP cannot deal with all fonts it finds, yet.
> Some will cause errors but these fonts will simply be ignored. We have a
> dilemma here: Some users simply don't care if any font cannot be loaded
> and other would want to know if and why their font hasn't been picked up.
> Furthermore, these messages should only appear once when there's no font
> cache file or the font cache file needed to be invalidated due to a
> version change or the addition of a font in the operating system.
>
>> obviously, the pdf doesn't respect the font spec in the style sheet.
>> Furthermore, its treatment of text on a path is no better than before;
>> viz three textPaths are rendered, out of around 100.
>
> Ok, in that case we're at a point where I'll ask you to send me a test
> file that I can run. In my tests, text on a path was painted as text.
> But there are still situations (for example with filter operations)
> where this is not possible and Batik produces the text internally using
> bitmaps. If I can take a look at your test files, I can tell you exactly
> it doesn't work in any special case.
>
>> I expect it's my own silly fault, but I'm not encouraged at the moment :-(
>> Thank God it's Friday!
>>
>>
>> 2008/11/14 Jeremias Maerki <[EMAIL PROTECTED]>:
>> > Oh, I didn't think about that. Sorry. Just include
>> > xmlgraphics-commons.jar in the classpath, too. Those classes are not
>> > folded into the allinone JAR because Batik is expected to add this
>> > dependency soon. HTH
>> >
>> > On 14.11.2008 13:29:25 Martin Jacobson wrote:
>> >> I expect I'm being really stupid, but I have been using the
>> >> batik-rasterizer.jar to test the conversion, as follows...
>> >>
>> >> Martin:batik-1.7 martin$ java -jar batik-rasterizer.jar -bg 0.4.12.25
>> >> -m application/pdf -d ~/Desktop/processMP.pdf ~/Desktop/processMP.svg
>> >> About to transcode 1 SVG file(s)
>> >>
>> >> Converting processMP.svg to /Users/martin/Desktop/processMP.pdf ... ... 
>> >> success
>> >>
>> >> but then, I do this
>> >>
>> >> Martin:batik-1.7 martin$ mv lib/pdf-transcoder.jar 
>> >> lib/pdf-transcoder.jar.old
>> >> Martin:batik-1.7 martin$ mv lib/fop-transcoder-allinone.jar
>> >> lib/pdf-transcoder.jar
>> >>
>> >> and this happens
>> >>
>> >> Martin:batik-1.7 martin$ java -jar batik-rasterizer.jar -bg 0.4.12.25
>> >> -m application/pdf -d ~/Desktop/processMP.pdf ~/Desktop/processMP.svg
>> >> Exception in thread "main" java.lang.NoClassDefFoundError:
>> >> org/apache/xmlgraphics/image/loader/ImageContext
>> >>       at java.lang.Class.forName0(Native Method)
>> >>       at java.lang.Class.forName(Class.java:164)
>> >>       at 
>> >> org.apache.batik.apps.rasterizer.DestinationType.getTranscoder(DestinationType.java:96)
>> >>       at 
>> >> org.apache.batik.apps.rasterizer.SVGConverter.execute(SVGConverter.java:690)
>> >>       at org.apache.batik.apps.rasterizer.Main.execute(Main.java:938)
>> >>       at org.apache.batik.apps.rasterizer.Main.main(Main.java:992)
>> >> Martin:batik-1.7 martin$
>> >>
>> >> Any clue? The batik build.xml doesn't make batik-rasterizer, so I'm
>> >> not sure how to progress. If I should be bugging the batik people,
>> >> please tell me!
>> >>
>> >> thanks
>> >> Martin
>> >>
>> >> 2008/11/13 Jeremias Maerki <[EMAIL PROTECTED]>:
>> >> > Martin,
>> >> >
>> >> > you will find that text rendering to PDF has improved a lot since the
>> >> > last Batik release. If you remove the pdf-transcoder.jar from the
>> >> > classpath and instead add FOP 0.95 (including dependencies) [1], you'll
>> >> > get virtually all text rendered as text instead of shapes. Please try it
>> >> > out, and if it doesn't work to your satisfaction, I'll try to get you up
>> >> > to speed to make further improvements.
>> >> >
>> >> > [1] You can also download the 0.95 or Trunk sources and build
>> >> > fop-transcoder-allinone.jar yourself(generated by default) which is
>> >> > basically the equivalent of pdf-transcoder.jar.
>> >> >
>> >> > On 13.11.2008 17:16:02 Martin Jacobson wrote:
>> >> >> I am a newbie on this list, so please forgive me if this has been
>> >> >> discussed before (I found nothing in the archive, however)...
>> >> >>
>> >> >> I have a cartographic application and I want to generate the output in
>> >> >> PDF format. For many reasons, I am using SVG as an intermediate
>> >> >> format, and I have been using the batik-rasterizer to convert to PDF.
>> >> >>
>> >> >> batik-rasterizer relies on FOP code for the pdf conversion, which is
>> >> >> why I'm here.
>> >> >>
>> >> >> It all works, with the notable exception of road names, which are
>> >> >> implemented in SVG as text on a path. I have read that this conversion
>> >> >> isn't in the current version of FOP. Is anyone working on this? If so,
>> >> >> what state is it in? If not, can someone tell me where I should start
>> >> >> from if I were to try implementing it myself? [I'm an experienced Java
>> >> >> developer, but I know v.little about PDF, and nothing about the fop
>> >> >> codebase]
>> >> >>
>> >> >> Thanks,
>> >> >> Martin
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > Jeremias Maerki
>> >> >
>> >
>> >
>> >
>> > Jeremias Maerki
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to