On Tue, 2004-09-21 at 08:22, Victor Mote wrote:

> Now, the second part of the question is how to set the configuration through
> your program. The beginnings of the answer are here:
> http://xml.apache.org/fop/embedding.html#config-internal
> 
> However, that only documents setting the standard configuration. The method
> you will need is this one:
>     public static void put(String key, Object value, int role)
> 
> The valid "role" values above are Configuration.STANDARD, Configuration.PDF,
> and Configuration.AWT. You want Configuration.PDF.
> 
> If you only have one filter to apply, skip the "list" concept and just drop
> the name of the filter in to the "value":
> 
>     Configuration.put("stream-filter-list", "ascii-85", Configuration.PDF);
> 
> If you need the list, build a java.util.ArrayList with the multiple entries
> and use it in the method. Something like this:
> 
>     java.util.ArrayList list = new java.util.ArrayList;
>     list.add("ascii-85");
>     list.add("flate");
>     Configuration.put("stream-filter-list", list, Configuration.PDF);
> 
> There is a strong possibility that I have some of the details wrong here,
> but this is the gist of it. Let me know if this doesn't work or if you have
> to make changes to get it to work.

Thanks *very* much for your response - it was exactly what I needed.

I had to reverse the order of filters in the list (flate first, then
ascii-85) but otherwise the code you suggested worked perfectly, and my
problem is solved.

Regards,

Simon



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

Reply via email to