Re: FO and Sockets. (

2001-09-26 Thread Tore Engvig



On Wed, 26 Sep 2001, Hinrich.Boog wrote:

>
>
> I would post it to some other mailing list, if it wasn't about the Fop-Renderer. How 
>can I
> check how and if the Renderer flushes the result to my output Stream ? I was 
>wondering if
> anyone has used it in those combinations

I don't know about the rest of your socket client/server, but you
indicated that you used readLine to read from the socket.

Remember that pdf is a binary format. You should use
InputStream.read(byte[]) methods or at least the ByteArrayInputStream
(the same goes for the server, it canæt use an OutputStreamWriter)


Tore

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


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




Re: FO and Sockets. (

2001-09-26 Thread Hinrich.Boog



I would post it to some other mailing list, if it wasn't about the Fop-Renderer. How 
can I
check how and if the Renderer flushes the result to my output Stream ? I was wondering 
if
anyone has used it in those combinations



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




Re: FO and Sockets.

2001-09-26 Thread Weiqi Gao

On Wed, 2001-09-26 at 07:50, Hinrich.Boog wrote:
> [...]
> 
> The communication works fine, the sending of the document and the
> transforming as well, I just have to put it together, which does not
> work: My client sends the stuff, the server starts transforming, but
> before the server is finished, the client shuts down.
>
> [...]

You would have better luck asking this question in a Java programming
mailing list or usenet group.  comp.lang.java.programmer maybe?  The
O'Reilly "Java I/O" book contains a chapter (I think) on Socket
programming.

-- 
Weiqi Gao
[EMAIL PROTECTED]


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




FO and Sockets.

2001-09-26 Thread Hinrich.Boog

Hi there,

I have a problem with using FOP over Sockets, maybe someone out there knows a 
workaround.
I just wanted to implement a small formatting Server, that listens to a port and in 
case a
request comes in, takes the xml:fo document from that request, transforms it and sends 
the
response back.

The communication works fine, the sending of the document and the transforming as 
well, I
just have to put it together, which does not work: My client sends the stuff, the 
server
starts transforming, but before the server is finished, the client shuts down.

Seems like the first part of my PDF document arrived, but then there's "null" and you 
can
use something like

while ((String in = inputStream.readLine()) != null) {
//do something
}

Here's the stuff that comes out of the server as long as the clients working...

Trying to read the answer
%PDF-1.3
%ª«¬­
null
Connection closed
File can be found in outfile.pdf

(At this time, the server was still building up the pages)

Does anyone know, how to handle this problem ?

Thanks
Hinrich


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