Not having the ASCII-85 filter in place is perfectly legal for a PDF. I wonder why you need that filter so your process works. Either you're working with a bad PDF viewer/reader or you're doing something wrong in stream handling, for example using Readers and Writers instead of InputStreams and OutputStreams. PDF is binary!
In your list below you should take out the "ascii-hex" filter because it does almost the same as the ascii-85 filter. You're encoding your in-PDF streams twice with a binary-to-ascii filter. Not that it doesn't work, it just kills the effect from the flate compression as the ascii-hex filter blows up the stream to twice its original size. The filter handling in FOP 0.20.5 is not ideal. PDF filters for JPEG images are indeed hard-coded so you will have to modify FOP's sources to "fix" this. Before you start hacking FOP sources, check that you're not doing something wrong (see above). If you absolutely need the ASCII-85 filter you can try to add the following line to org.apache.fop.pdf.PDFXObject in method output(OutputStream), approx. line 254: if (fopimage.getPDFFilter() != null) { imgStream.addFilter(fopimage.getPDFFilter()); //the next line is new: imgStream.addFilter(new ASCII85Filter()); } else { imgStream.addDefaultFilters(); } On 10.02.2005 06:27:50 Yakov Shafranovich wrote: > We have been using FOP in a servlet to generate PDF files out of a XSLT > template. One of the problem we had is that the plain PDF output did not > work until the ASCII-85 filter was enabled as follows: > > List list = new ArrayList(2); > list.add("flate"); > list.add("ascii-hex"); > list.add("ascii-85"); > Configuration.put("stream-filter-list", list, Configuration.PDF); > > Now for the first time, we used an XSL-FO template with JPEG images via > the use of the fo:external-graphic tag. The template works fine locally > but when run in the servlet it fails. Upon closer inspection, the output > PDF file contains ASCII-85 encoding for everything EXCEPT the embedded > JPEGs. The JPEGs come out as binary streams even though the rest of the > file isn't. Is there a way to force ASCII-85 encoding on the whole file? Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]