In order to get a "real quick" answer you'd have to provide the full set
of information, the FOP version you're using, for example. I assume
you're using FOP 0.20.5 because there the PDFTranscoder takes a special
parameter instead of the strokeSVG parameter in the config file to
configure painting of text. Your code example creates an Avalon
configuration object but that's only of use in the HEAD version of FOP
in CVS.
So, you've got two options:
1. Upgrade to FOP HEAD from CVS so you get the latest, most advanced PDF
Transcoder which determines automatically when it can paint text as text
and when it has to resort to painting text as shapes. It's not always
possible to paint text as text because there may be complex
circumstances like alinging text on a path which are not yet implemented
in either version of FOP.
2. Try the following code (modified from your example) to switch to text
painting:
File userConfigFile = new File("C:/userconfig.xml");
Options options = new Options();
options.loadUserconfiguration(userConfigFile);
AbstractFOPTranscoder transcoder = new org.apache.fop.svg.PDFTranscoder();
transcoder.addTranscodingHint(PDFTranscoder.KEY_STROKE_TEXT, new
Boolean(false);
TranscoderInput input = new TranscoderInput(
new FileInputStream("C:/start.svg"));
TranscoderOutput output = new TranscoderOutput(baos);
transcoder.transcode(input, output);
Another comment: Having the text as shapes is not really a bad thing as
long as people have enabled "smooth line art" in Acrobat Reader in which
case you wouldn't see much of a difference. It only looks worse on
screen when the settings is disabled. Printing the PDF produces nice
results.
I hope that helps.
On 12.04.2004 02:51:59 Shaun Roach wrote:
> I am having trouble with getting the PDFTranscoder to output text
> instead of glyphs. I have tried just about everything, and I was
> wondering if anyone could help me out. For my latest try, I basically
> modified some code I found somewhere on the internet, it is below.
>
> Could someone inspect it really quickly and tell me what might be wrong?
> I am not getting any errors, but the resulting PDF (It is a webbased
> program and I return the ByteArrayOutputStream PDF to the browser) has
> the text rendered as glyphs.
> Thanks for your time,
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]