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.
This works correctly in IE11 and Firefox.
Because of this when i try opening the PDF downloaded from chrome, they give an error in Acrobat.
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"> <head><title> </title></head> <body> <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" /> </div> <div> </div> </form> </body> </html>
My chrome version: Version 58.0.3029.110 (64-bit) Windows 7 64 Bit