• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PDF Streaming

 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay. So here's what I need. I'm trying to take a PDF file and display it on a JSP page. So this should be pretty simple. The problem is this. I do not want to give direct access to the directory. I'd like to somehow stream this PDF to the browser when the file is requested. Any clues??
-Dale

------------------
What's this H2SO4 doing in my fridge?? ( thud )
 
Maky Chopra
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To dump a pre-written pdf file on the browser, you will simply have set your ContentType = "application/pdf"
If your requirement is to generate a pdf file on demand (say a acceptance form with the users name pre-filled in the PDF) you could use iText (http://www.lowagie.com/iText).
[This message has been edited by Mak Bhandari (edited May 03, 2001).]
 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay.. This looks like it can do the job. Can you give a clue to what objects I'll be working with in this class? If you don't know, I can research it. iText looks very impressive.
-Dale

------------------
What's this H2SO4 doing in my fridge?? ( thud )
 
Maky Chopra
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry.. Been a while since I played with itext.. Offhand, I wont be able to tell you its classes but its pretty easy and has some decent examples in the download.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I tried streaming an pdf file to the client. But what happens is, even after the pdf file is streamed, the mouse cursor is still in the busy state on the client side. Is there any way to avoid this.
I am passing the "content-length" , "content-type" headers to the client.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic