[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-user
Subject:    Re: Handling multiple spaces
From:       Jeremias Maerki <dev.jeremias () greenmail ! ch>
Date:       2004-12-27 20:05:29
Message-ID: 20041227201519.ED03.DEV.JEREMIAS () greenmail ! ch
[Download RAW message or body]

Sorry for the delay. Christmas got in the way.

On 24.12.2004 13:57:47 Saptarshi Sen wrote:
> Hi,
> 	I am just not able to embed fonts into my PDF images while using
> PDFTranscoder. As a result, the PDF's are quite large.

But the output looks fine, right?

> 	I created a config file with the font declarations and used the
> Config builder to configure the transcoder. But it does not embed the fonts.
> I could be doing something wrong; but I don't know what. I tried to remove
> the <fonts> tag in the config file; but even that did not help.
> 
> 	What is interesting is that when I tried to convert my SVG (with
> embedded fonts) into a PDF using the batik-rasterizer.jar utility, it
> actually gave me a PDF with embedded fonts. In this case, I hadn't even
> provided any font information. What is the reason for this?

Frankly, I don't know. It shouldn't, at least not without a font
configuration.

> 	Also, if this *phenomenon* can be banked on, can I try and use the
> batik-rasterizer utility from within my application?

In the end, the rasterizer utility uses the Transcoder API, so I can't
see right now where this comes from.

I've checked this just now. From the command-line rasterizer I get a
relatively big PDF (32KB) with the text painted as shapes based on the
embedded SVG font subset. The output looks fine. The same I can get from
the Transcoder API. I also checked again with your SVG stripped of the
embedded font but instead using an XML font configuration which
specifies a font to be embedded (I don't have your font, so I just used
a different one). Worked fine, too (11KB with a TrueType font). With the
embedded SVG stripped and without font configuration the PDF is 3KB but
obviously with the wrong font.

I noticed one thing, however. The pdf-transcoder.jar delivered with
Batik 1.5.1 is from early 2003 and does not contain the code that allows
for a font configuration. It also doesn't result in an Exception because
ContainerUtil just skips configuring the Transcoder instance if it
doesn't support that operation. So if you want to use the embedded fonts
it looks like you will need the code from the snapshot you got earlier.
But that may also mean that you have to get the latest Batik from CVS,
because there were a number of API changes since then and you have to
use the latest Batik sources so the two parts work together properly.

> 	Is there any semi-stable release of FOP since 0.20.5 where the
> "xml:space" attribute is respected and which is ready for use in
> applications. It need not have all features that are there in the current
> version - I just want that attribute to be respected. If such a release does
> not exist, is there any code snippet that recognizes the "xml:space"
> attribute which I can plug into the 0.20.5 code and rebuild the fop.jar file?

The maintenance branch (where 0.20.5 came from) doesn't seem to contain
a fix for that. I actually tested on that code, not on 0.20.5. So, no,
there is currently no easy fix for this problem. I don't even know,
off-hand, where to start looking. This would take a nice debugging
session which I'm not very keen on because I have other priorities. And
IMO, it's not the right approach to use an XSL-FO wrapper for this.


Jeremias Maerki


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic