• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PDF Streaming

 
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 )
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bras cause cancer. And tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic