I have a problem where when i open a URL to view a document, it opens up correctly in chrome. Now if from that document, i click on the download button, chrome does not recognize it as PDF file and "Save as type" has only "All files" option.

enter image description here

This works correctly in IE11 and Firefox.

enter image description here

Because of this when i try opening the PDF downloaded from chrome, they give an error in Acrobat.

enter image description here

Adding .pdf to filename when downloading from chrome did not fix the issue. Instead, if I open the erroneous PDF in Notepad, below code snippet is seen at the end of the file while the same is not there in the file downloaded using IE. If I remove this snippet and save the file, it starts working correctly.

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

    <form method="post" action="getNWFile.aspx?..............<url this is used to fetch our file>" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZA3k6CSZmPPepPl8BECdr78HWf1D7T//guQhnvY1Ea0x" />



My chrome version: Version 58.0.3029.110 (64-bit) Windows 7 64 Bit

  • 1
    What error you get exactly? – Techie Gossip Jun 9 '17 at 9:25
  • Regarding your assumption that "because of this...", I would doubt that. A PDF reader doesn't care whether or not a browser identifies a document type correctly (unless the browser modified the document during download, which should absolutely not be the case). -- For how many documents did you try this? Can you provide an example URL? – Run CMD Jun 9 '17 at 9:28
  • Your images links are broken. – DavidPostill Jun 9 '17 at 9:55

Your Answer

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

Browse other questions tagged or ask your own question.