0

When I click a button it downloads a pdf document.After that when I try to open the document in browser I am getting a message "Failed to load PDF document".But when I am trying to open directly the file from document library it opens up with out any issues. Thank you.

  • so when you trying to open the download copy then you gets the error? what IE version using? do you have the PDF client install on your PC? also right click on the downloaded file and make sure its not blocked. – Waqas Sarwar MVP Jun 3 '14 at 21:08
  • Hi Waqas, I am using IE11. I am having the same issue on IE and Chrome.Actually the pdf file is located in a document library, I am able to open it from there with out any issues.The main problem is I wrote a code in a button to get the pdf file from the document library.When I click a button I am able get that file and able to download but when I open then I am having getting Failed to load pdf document – Sai Jun 3 '14 at 21:47
  • i think then problem with code, most probably the downloaded file is not correct, with corrupted or incompleted....its good if you post your code so some developer can have look on it – Waqas Sarwar MVP Jun 4 '14 at 2:58
  • Thank you Waqas.Yes,It is the code issue. I fixed it. – Sai Jun 4 '14 at 16:01
  • great, i think then mark the question as answered and close it. – Waqas Sarwar MVP Jun 4 '14 at 16:06
1

If you open it properly from the library and only downloaded file causing the issue.

I think then problem with code, most probably the downloaded file is not correct, with corrupted or incompleted....its good if you post your code so some developer can have look on it

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.