Hi All,

I have a "c" application which has been generating PDFs by executing the
"fop.sh" script. I have now rewritten the process in Java, and am using
the o.a.f.apps.Driver class directly.

However the old code used to produce PDFs which contained only printable
characters (some sections look like base64 encoding).
The new code produces sections which contain "binary" data.

For various reasons I need to ensure that the PDF output contains
printable characters only, like the old solution did.

The old PDFs include lines like this:
 << /Length 1917 /Filter [ /ASCII85Decode /FlateDecode ]
while the new ones have lines like this:
 << /Length 1474 /Filter /FlateDecode 

At a guess, I would say that with my old app (using fop.sh) the
non-printable data has been "deflated" then "ascii85-encoded" to render
it into all printable chars (probably at a filesize penalty), while the
new code (calling Driver directly) skips the ascii85 encoding step.
Assuming this is the case, can anyone tell me how to enable the
ascii85-encoding of data within the PDF, using the o.a.f.apps.Driver API
or similar??

I'm using fop 0.20.5 in both the "old" and the "new" code, though in the
"new" case I'm possibly using some updated libs.

Here's the java Code I currently use to invoke the Driver:
        Driver driver = new Driver();
        driver.setLogger(fopLogger);
        driver.setRenderer(Driver.RENDER_PDF);

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        driver.setOutputStream(baos);

        DocumentInputSource  documentInputSource 
                = new DocumentInputSource(msg);
        driver.setInputSource(documentInputSource);

        driver.run();

        return baos.toByteArray();


Thanks in advance,

Simon



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

Reply via email to