AW: Byte Serving PDF's
AFAIK the only thing you have to do is let tomcat 4.0 serve the PDF's instead of your own servlet. Tomcat 4 implements HTTP 1.1 which introduced something like 'byte range request' (I don't have the exact name at hand) which is used by the acrobat reader. -Ursprüngliche Nachricht- Von: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 14. November 2001 23:59 An: 'Tomcat Users List' Betreff: RE: Byte Serving PDF's Yes. It's not only possible, but support for it is built in to most modern web servers. The PDF has to be optimized for byte-serving and the web server has to be capable of byte-serving. So my question remains. Anyone out there done it or know how to configure Tomcat 4 to do it? -T -Original Message- From: Chris Tucker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 5:48 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Is this even possible? From my understanding of the PDF format, it is inherently random-access and relies on the entire file being available before it can be displayed. -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:24 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's The PDF's are pre-existing. I need to byte serve them (for page-at-a-time access via the Acrobat Reader plug-in in the client's browser). Currently we have a servlet that reads the file and streams the whole thing back. Some of the PDF's are quite large (13 megs). This means that the user has to wait until all 13 megs are received before s/he can view it. Byte-serving solves that problem, I just don't know how to do it. -T -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 4:54 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Byte Serving PDF's
Not necessary, if tomcat 3.x/4.0 forward the Range information to the end Servlet - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 15, 2001 9:09 AM To: Tomcat Users List Subject: AW: Byte Serving PDF's AFAIK the only thing you have to do is let tomcat 4.0 serve the PDF's instead of your own servlet. Tomcat 4 implements HTTP 1.1 which introduced something like 'byte range request' (I don't have the exact name at hand) which is used by the acrobat reader. -Ursprüngliche Nachricht- Von: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 14. November 2001 23:59 An: 'Tomcat Users List' Betreff: RE: Byte Serving PDF's Yes. It's not only possible, but support for it is built in to most modern web servers. The PDF has to be optimized for byte-serving and the web server has to be capable of byte-serving. So my question remains. Anyone out there done it or know how to configure Tomcat 4 to do it? -T -Original Message- From: Chris Tucker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 5:48 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Is this even possible? From my understanding of the PDF format, it is inherently random-access and relies on the entire file being available before it can be displayed. -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:24 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's The PDF's are pre-existing. I need to byte serve them (for page-at-a-time access via the Acrobat Reader plug-in in the client's browser). Currently we have a servlet that reads the file and streams the whole thing back. Some of the PDF's are quite large (13 megs). This means that the user has to wait until all 13 megs are received before s/he can view it. Byte-serving solves that problem, I just don't know how to do it. -T -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 4:54 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Byte Serving PDF's
This doesn't seem to work for me. To test the theory, I dropped an 11.5 meg optimized PDF (i.e. a PDF prepared by Adobe Acrobat for byte serving) in the context root of an app in Tomcat 4. When I access the pdf directly using the file name in the URL, the whole thing still downloads before it displays. And I haven't messed with Tomcat 4's default configuration. I checked my browser acrobat plug-in (IE 6 w/ Acrobat Reader 5.01) to make sure they are configured correctly. Furthermore, I found a site that has some fairly large PDF's (http://web2.chm.msu.edu/oem/Blasting.htm) and the first page of those DO appear before the entire file finishes downloading. I then copied a 3.5 meg file from that site (http://web2.chm.msu.edu/oem/Blasting/Instruct/t01-10.pdf) and dropped it into the Tomcat 4 app. When I access that same file via Tomcat, the whole thing downloads before it displays. Any ideas? For those interested, here's Adobe's technical notes on the subject: http://www.adobe.com/support/techguides/acrobat/byteserve/byteservmain.html -T -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 15, 2001 3:09 AM To: Tomcat Users List Subject: AW: Byte Serving PDF's AFAIK the only thing you have to do is let tomcat 4.0 serve the PDF's instead of your own servlet. Tomcat 4 implements HTTP 1.1 which introduced something like 'byte range request' (I don't have the exact name at hand) which is used by the acrobat reader. -Ursprüngliche Nachricht- Von: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 14. November 2001 23:59 An: 'Tomcat Users List' Betreff: RE: Byte Serving PDF's Yes. It's not only possible, but support for it is built in to most modern web servers. The PDF has to be optimized for byte-serving and the web server has to be capable of byte-serving. So my question remains. Anyone out there done it or know how to configure Tomcat 4 to do it? -T -Original Message- From: Chris Tucker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 5:48 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Is this even possible? From my understanding of the PDF format, it is inherently random-access and relies on the entire file being available before it can be displayed. -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:24 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's The PDF's are pre-existing. I need to byte serve them (for page-at-a-time access via the Acrobat Reader plug-in in the client's browser). Currently we have a servlet that reads the file and streams the whole thing back. Some of the PDF's are quite large (13 megs). This means that the user has to wait until all 13 megs are received before s/he can view it. Byte-serving solves that problem, I just don't know how to do it. -T -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 4:54 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Byte Serving PDF's
Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Byte Serving PDF's
Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Byte Serving PDF's
The PDF's are pre-existing. I need to byte serve them (for page-at-a-time access via the Acrobat Reader plug-in in the client's browser). Currently we have a servlet that reads the file and streams the whole thing back. Some of the PDF's are quite large (13 megs). This means that the user has to wait until all 13 megs are received before s/he can view it. Byte-serving solves that problem, I just don't know how to do it. -T -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 4:54 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Byte Serving PDF's
Is this even possible? From my understanding of the PDF format, it is inherently random-access and relies on the entire file being available before it can be displayed. -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:24 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's The PDF's are pre-existing. I need to byte serve them (for page-at-a-time access via the Acrobat Reader plug-in in the client's browser). Currently we have a servlet that reads the file and streams the whole thing back. Some of the PDF's are quite large (13 megs). This means that the user has to wait until all 13 megs are received before s/he can view it. Byte-serving solves that problem, I just don't know how to do it. -T -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 4:54 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Byte Serving PDF's
Yes. It's not only possible, but support for it is built in to most modern web servers. The PDF has to be optimized for byte-serving and the web server has to be capable of byte-serving. So my question remains. Anyone out there done it or know how to configure Tomcat 4 to do it? -T -Original Message- From: Chris Tucker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 5:48 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Is this even possible? From my understanding of the PDF format, it is inherently random-access and relies on the entire file being available before it can be displayed. -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:24 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's The PDF's are pre-existing. I need to byte serve them (for page-at-a-time access via the Acrobat Reader plug-in in the client's browser). Currently we have a servlet that reads the file and streams the whole thing back. Some of the PDF's are quite large (13 megs). This means that the user has to wait until all 13 megs are received before s/he can view it. Byte-serving solves that problem, I just don't know how to do it. -T -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 4:54 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Byte Serving PDF's
Is this even possible? From my understanding of the PDF format, it is inherently random-access and relies on the entire file being available before it can be displayed. I don't know how it does it, but I've downloaded PDFs that seem to work page-by-page because when I click down, I can see network activity a slow response to paint the page as I've moved forward. But that might be a PDF config item in which pages are defined so that they are really separate parts. David -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Byte Serving PDF's
I wrote a small servlet that went through PDF's byte by byte sending them to the output stream. It also looked for default values in PDF form fields and replaced them with parameters sent in by the request. Here's a slice of the code, but it's the part that loads the PDF file. The actual writing of the bytes to the OutputStream occurs in fillTemplateFileWithValues(), a portion of which is below. public void doGet( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { res.setContentType( application/pdf ); try { InputStream template = getServletContext().getResourceAsStream( processPath(req) + .pdf ); OutputStream custom = res.getOutputStream(); PDFConverter convert = new PDFConverter( template, custom, buildParameterMap(req) ); convert.fillTemplateFileWithValues(); res.setContentLength( convert.getBytesSent() ); template.close(); custom.close(); } catch ( FileNotFoundException fnfe ) { fnfe.printStackTrace(); } catch ( SecurityException se ) { se.printStackTrace(); } catch ( InvalidStreamException ise ) { ise.printStackTrace(); } } This is the loop that outputs the PDF bytes that are definitely not going to be replaced. Another loop looks for strings to replace. while ( !inString (lastByteRead != EOF) ) { try { lastByteRead = templateFile.read(); } catch (IOException ioe) { ioe.printStackTrace(); lastByteRead = EOF; break; } // If we hit EOF, get out of this loop. // The others will take care of themselves. if( lastByteRead == EOF ) { break; // Found the start of a string } else if( lastByteRead == '(' ) { inString = true; } try { convertedFile.write( lastByteRead ); bytesSent = bytesSent + 1; } catch (IOException ioe) { ioe.printStackTrace(); lastByteRead = EOF; break; } } You could probably do this a lot simpler because you aren't replacing any PDF content, but this code's worked well for me. I don't know if it will solve your problem, though. It certainly doesn't stream it on a one-page-at-a-time basis, and it wouldn't display for us until we called setContentLength(). Of course, if you know that ahead of time (we can't for replacing), then you might luck out. Hope that helps... Tim [EMAIL PROTECTED] 11/14/01 03:59PM Yes. It's not only possible, but support for it is built in to most modern web servers. The PDF has to be optimized for byte-serving and the web server has to be capable of byte-serving. So my question remains. Anyone out there done it or know how to configure Tomcat 4 to do it? -T -Original Message- From: Chris Tucker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 5:48 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Is this even possible? From my understanding of the PDF format, it is inherently random-access and relies on the entire file being available before it can be displayed. -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:24 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's The PDF's are pre-existing. I need to byte serve them (for page-at-a-time access via the Acrobat Reader plug-in in the client's browser). Currently we have a servlet that reads the file and streams the whole thing back. Some of the PDF's are quite large (13 megs). This means that the user has to wait until all 13 megs are received before s/he can view it. Byte-serving solves that problem, I just don't know how to do it. -T -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 4:54 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles
RE: Byte Serving PDF's
Ok, so now I want to know more. :-) This sounds like a potentially very useful solution to an irritating problem... are there any issues with increased file sizes or anything? As far as byte-by-byte sending of data, it's really easy to write a custom application that runs as a server to do this (I did something similar for mp3's in about 200 lines with thread support and id3 parsing), and you can then also take advantage of a high-performance native language to offer low overhead per requesting process (over, e.g. Tomcat or Apache) if you want to. If you have to use Tomcat, I'm afraid I'm not sure of a best approach. Whatever happens, I'd be interested to hear of your solution. Chris -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:59 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's Yes. It's not only possible, but support for it is built in to most modern web servers. The PDF has to be optimized for byte-serving and the web server has to be capable of byte-serving. So my question remains. Anyone out there done it or know how to configure Tomcat 4 to do it? -T -Original Message- From: Chris Tucker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 5:48 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Is this even possible? From my understanding of the PDF format, it is inherently random-access and relies on the entire file being available before it can be displayed. -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:24 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's The PDF's are pre-existing. I need to byte serve them (for page-at-a-time access via the Acrobat Reader plug-in in the client's browser). Currently we have a servlet that reads the file and streams the whole thing back. Some of the PDF's are quite large (13 megs). This means that the user has to wait until all 13 megs are received before s/he can view it. Byte-serving solves that problem, I just don't know how to do it. -T -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 4:54 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Byte Serving PDF's
If all it takes is the ability to respond to requests for ranges of a file (which is how I understand PDFs to work), then Tomcat 4's HTTP connector in stand-alone mode knows how to do this already for static files. If you create the content dynamically, then it is up to your application to respond to the Range headers. Craig On Wed, 14 Nov 2001, Chris Tucker wrote: Date: Wed, 14 Nov 2001 15:39:20 -0800 From: Chris Tucker [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Byte Serving PDF's Ok, so now I want to know more. :-) This sounds like a potentially very useful solution to an irritating problem... are there any issues with increased file sizes or anything? As far as byte-by-byte sending of data, it's really easy to write a custom application that runs as a server to do this (I did something similar for mp3's in about 200 lines with thread support and id3 parsing), and you can then also take advantage of a high-performance native language to offer low overhead per requesting process (over, e.g. Tomcat or Apache) if you want to. If you have to use Tomcat, I'm afraid I'm not sure of a best approach. Whatever happens, I'd be interested to hear of your solution. Chris -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:59 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's Yes. It's not only possible, but support for it is built in to most modern web servers. The PDF has to be optimized for byte-serving and the web server has to be capable of byte-serving. So my question remains. Anyone out there done it or know how to configure Tomcat 4 to do it? -T -Original Message- From: Chris Tucker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 5:48 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Is this even possible? From my understanding of the PDF format, it is inherently random-access and relies on the entire file being available before it can be displayed. -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:24 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's The PDF's are pre-existing. I need to byte serve them (for page-at-a-time access via the Acrobat Reader plug-in in the client's browser). Currently we have a servlet that reads the file and streams the whole thing back. Some of the PDF's are quite large (13 megs). This means that the user has to wait until all 13 megs are received before s/he can view it. Byte-serving solves that problem, I just don't know how to do it. -T -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 4:54 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Byte Serving PDF's
If all it takes is the ability to respond to requests for ranges of a file (which is how I understand PDFs to work), then Tomcat 4's HTTP connector in stand-alone mode knows how to do this already for static files. If you create the content dynamically, then it is up to your application to respond to the Range headers. I haven't tested this with PDFs, but it works very well with the recent WinAMPs (where you can seek in the MP3 when the file is streamed from the HTTP server) and Getright. Remy -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Byte Serving PDF's
I believe PDF will show the pages downloaded so far without having the users wait for the entire file. Have a look at the prospectous on this site www.funtastics.com.au the PDF file seems to behave like that. Hope this help. Kar - Original Message - From: MacDonald, Todd [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, November 15, 2001 9:59 AM Subject: RE: Byte Serving PDF's Yes. It's not only possible, but support for it is built in to most modern web servers. The PDF has to be optimized for byte-serving and the web server has to be capable of byte-serving. So my question remains. Anyone out there done it or know how to configure Tomcat 4 to do it? -T -Original Message- From: Chris Tucker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 5:48 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Is this even possible? From my understanding of the PDF format, it is inherently random-access and relies on the entire file being available before it can be displayed. -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 2:24 PM To: 'Tomcat Users List' Subject: RE: Byte Serving PDF's The PDF's are pre-existing. I need to byte serve them (for page-at-a-time access via the Acrobat Reader plug-in in the client's browser). Currently we have a servlet that reads the file and streams the whole thing back. Some of the PDF's are quite large (13 megs). This means that the user has to wait until all 13 megs are received before s/he can view it. Byte-serving solves that problem, I just don't know how to do it. -T -Original Message- From: Jim Urban [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 4:54 PM To: Tomcat Users List Subject: RE: Byte Serving PDF's Do you want to dynamically generate the PDF on the fly and return it directly to the browser or to simply serve PDF files? If you want to do the first, check out the FOP website and have a look at the FOPServlet source code. This assumes you can make the contents of the PDF available in XML format for processing by FOP. Jim -Original Message- From: MacDonald, Todd [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:53 PM To: Tomcat-User (E-mail) Subject: Byte Serving PDF's Anyone know how (or better yet, have some code to) byte serve PDF's through Tomcat 4? -T -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]