Hi all,

I am trying to get FOP (0.20.3) to not stroke
text when converting SVG to PDF. I've tried
everything and can't get it to work. 

Here's the code I'm using to convert SVG to PDF:


PDFTranscoder pdfTranscoder = new PDFTranscoder();

// Insertion Point (see below)

try {

  FileInputStream fileInputStream = 
    new FileInputStream(inFileName);
  FileOutputStream fileOutputStream = 
    new FileOutputStream(outFileName);

  TranscoderInput transcoderInput = 
    new TranscoderInput(fileInputStream);
  TranscoderOutput transcoderOutput = 
    new TranscoderOutput(fileOutputStream);



catch (IOException e) {
  System.out.println("e = " + e);
catch (TranscoderException e) {
  System.out.println("e = " + e);


If I run this on the attached SVG file (text.svg)
I get the attached PDF file (text.pdf) but the 
text is stroked.

I've tried two ways to get FOP to not stroke the
text. In either case, insert the code in the spot
marked "Insertion Point" above.


First, I tried this:

  "strokeSVGText", Boolean.FALSE);

Unfortunately, this has no effect at all. Any
ideas why?


Second, I tried this:

Map hints = new HashMap();
hints.put(PDFTranscoder.KEY_STROKE_TEXT, Boolean.FALSE);

This doesn't run because of a bug in FOP, I believe.
Here's what I think is wrong: In file PDFTranscoder.java,
starting at line 130 is says:

public static final TranscodingHints.Key 
  KEY_STROKE_TEXT = new StringKey();

But then, starting at line 173 it says:

boolean stroke = true;
if (hints.containsKey(KEY_STROKE_TEXT)) {
  stroke = ((Boolean)hints.get(KEY_STROKE_TEXT))

So, I guess in line 174 it expects a Boolean, but I can't
get a Boolean into the Map because KEY_STROKE_TEXT is a
StringKey. So, KEY_STROKE_TEXT should probably be a


Two final questions: 

1) There seem to be two ways to configure text stroking.
What's the difference and which is the preferred way?

2) In the mailing list archive I've read that there are
limitations when not stroking text in FOP. 
What exactly are these limitations?

Thanks for your help,

If this email is not intended for you, or you are not responsible for the
delivery of this message to the addressee, please note that this message may
contain ITT Privileged/Proprietary Information.  In such a case, you may not
copy or deliver this message to anyone.  You should destroy this message and
kindly notify the sender by reply email.  Information contained in this
message that does not relate to the business of ITT is neither endorsed by
nor attributable to ITT. 


Attachment: text.svg
Description: Binary data

Attachment: text.pdf
Description: Binary data

Reply via email to