You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Steven Lane <sl...@mail.fmpro.com> on 2001/03/22 06:56:23 UTC

Different output from Driver

Hello all:

A question from a FOP newbie -- is there any big obstacle to getting the
Driver class to render to something other than a file? I'd like to write a
servlet that returns the PDF directly to the client.  But Driver writes to
an OutputStream, and servlets write to a PrintWriter. Maybe there's some
simple manipulation I can do and I just need to learn the I/O API better .
. .

Thanks in advance for any help

----------
Steve Lane
Senior Project Manager
Chris Moyer Consulting, Inc.
833 West Chicago Ave Suite 203
(312) 433-2421
http://www.fmpro.com



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Different output from Driver

Posted by Steven Lane <sl...@mail.fmpro.com>.
>You can get an OutputStream from the servlet 2.2 API. There's an example
>servlet in docs/examples/embedding. Binary formats like PDF require using
>OutputStream because Writers provide character encoding which can
>interfere with the binary format.

I saw the example servlet but it seemed as if it was only part of the 0.18
download, not the 0.17 I was working with. In the 0.17 Driver.java, the
only constructor to Driver takes no arguments. The 0.18 code, on the other
hand, renders my files very differently.

So ... is the Driver constructor for an arbitrary OutputStream new in 0.18?
And is the 0.18 code stable/usable?

Thanks,

steve

----------
Steve Lane
Senior Project Manager
Chris Moyer Consulting, Inc.
833 West Chicago Ave Suite 203
(312) 433-2421
http://www.fmpro.com



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Different output from Driver

Posted by Kelly Campbell <ca...@merlot.channelpoint.com>.
You can get an OutputStream from the servlet 2.2 API. There's an example
servlet in docs/examples/embedding. Binary formats like PDF require using
OutputStream because Writers provide character encoding which can
interfere with the binary format.

-Kelly

On Wed, Mar 21, 2001 at 11:56:23PM -0600, Steven Lane wrote:
> Hello all:
> 
> A question from a FOP newbie -- is there any big obstacle to getting the
> Driver class to render to something other than a file? I'd like to write a
> servlet that returns the PDF directly to the client.  But Driver writes to
> an OutputStream, and servlets write to a PrintWriter. Maybe there's some
> simple manipulation I can do and I just need to learn the I/O API better .
> . .
> 
> Thanks in advance for any help
> 
> ----------
> Steve Lane
> Senior Project Manager
> Chris Moyer Consulting, Inc.
> 833 West Chicago Ave Suite 203
> (312) 433-2421
> http://www.fmpro.com
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org

-- 
Kelly A. Campbell              Software Engineer
<ca...@merlotxml.org>           ChannelPoint, Inc.
<ca...@channelpoint.com>        Colorado Springs, Co.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org