xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Art Welch <ar...@EASTPOINT.COM>
Subject RE: Streaming PDF
Date Thu, 29 Mar 2001 19:04:56 GMT
I will ponder this for a bit. There are a few things that make me nervous
about this code. A couple of times during development it mysteriously
stopped working and then equally mysteriously started working again. It has
remained working ever since (but I have not really been banging on it). I
developed it after a cursory review of the specifications and looking at
some other implementations. Basically it was a "quick and dirty" test to see
if it would work. I am also not sure I understand the implications of
chunked or HTTP 1.1...

I must admit that the implementations I found were either commercial or
infected with GPL. But I did not look very hard either. After seeing the
implementations (not much to them) and looking at the spec (not much to it -
at least as far as chunked) (this probably means that I am missing something
- hence my reluctance). I decided to roll my own.

Pensively,
Art

-----Original Message-----
From: Kelly Campbell [mailto:camk@channelpoint.com]
Sent: Thursday, March 29, 2001 1:58 PM
To: 'fop-dev@xml.apache.org'
Subject: RE: Streaming PDF


Art, I'd be happy to take what you've got and clean it up and integrate it
into the Fop servlet we include with FOP. I think it would be a good thing
to have. I was looking around for implementations we could bundle and use,
but didn't get very far initially.

-Kelly

> -----Original Message-----
> From: Art Welch [mailto:art_w@EASTPOINT.COM]
> Sent: Thursday, March 29, 2001 11:34 AM
> To: 'fop-dev@xml.apache.org'
> Subject: Streaming PDF
> 
> 
> I saw streaming PDFs mentioned in a recent e-mail. I do not 
> know if what I
> am about to say will be relevant to the original topic, but I 
> thought that I
> would relate the information anyway.
> 
> I had been having a problem in my environment where PDFs generated
> dynamically by FOP running in a servlet were not rendered 
> properly in M$ IE
> 5. It was discovered that large PDFs (> 8k) displayed 
> properly, but small
> ones did not display at all. Further discussion on the list 
> suggested that
> IE requires that either the content-length be set or the data 
> sent HTTP
> chunked. I do not like having to store a potentially quite 
> large PDF just so
> that I can find out how big it is to set the header. So I 
> tried implementing
> an HTTP Chunked OutputStream. This was not too difficult to 
> do and it kind
> of works, except that in my testing I found that even with the chunked
> output, small (< 8k) PDFs STILL DO NOT DISPLAY IN IE5! I then 
> changed the
> chunked output stream to use an 8k buffer to build the 
> chunks. If the output
> is closed before the buffer is filled the first time then I 
> just set the
> content-length header and send the contents of the buffer 
> non-chunked. If
> there is more output after the buffer has been filled then 
> the data is sent
> chunked. So far this seems to be working, but I have not tested it
> rigorously. I also understand that since this requires HTTP 
> 1.1 it may not
> work in the general case.
> 
> I present this information in the hopes that it will be 
> helpful to someone.
> I do not think that FOP should attempt to include chunked 
> output capability.
> It should write to a stream - the stream implementation 
> determined by the
> external application. For anyone interested in doing the same 
> thing, there
> are a few chunked stream implementations out there - or you 
> could write your
> own. My implementation is kind of limited and not well 
> tested, so I am not
> willing to make it available at this point. Maybe I will 
> reconsider after I
> have done more testing - but at the moment I am preoccupied 
> with migrating
> my application to XalanJ2 from XalanJ1 and have not been able 
> to look at FOP
> or output related things for a while.
> 
> FYI,
> Art
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
> 

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

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


Mime
View raw message