• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PDF Download Servlet Problem

 
Jaz Chana
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I'm having issues creating a file download servlet to download pdf files. I can successfully download text files using this code. For some reason however I cannot download a pdf using the same code. On execution, the browser will present me with a dialogue box asking me to open, save or cancel. If i open or save and open later I get an error message saying that the pdf file is corrupt or damaged and won't open properly. I have tried opening the original pdf on the server and there are no problems there. I have absolutely no idea why this is happening. Can someone point me in the right direction please.



Thank You
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start by reading ReadDoesntDoWhatYouThinkItDoes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic