TamRaymondUS-5932 avatar image
0 Votes"
TamRaymondUS-5932 asked Deepak-MSFT commented

C# create PDF unable to see in Edge

I have a web page which creates PDF document shows correctly in IE with file type of PDF.

However when the same web page creates PDF it cannot be shown in MS Edge and the file type being downloaded is of ASPX. In addition, this downloaded file can be opened with Adobe PDF reader.

Therefore, I wish to know how the file type is assigned in MS Edge.


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please inform us, which exact version of the Edge browser you are using for making this test?
Does the issue is producible if you try to use any other browser except IE or Edge?
I suggest you please provide the sample code with detailed steps for producing the issue. We can try to follow your steps and try to check for the result.
It can help to better understand the issue.
Thanks for your understanding.

0 Votes 0 ·

Today I update the version to 89.0.774.75.

Same issue is encountered.

Few days ago I change one of header attribute from

response.AddHeader("Content-Disposition", string.Format("attachment: filename={0}", Report + "." + "pdf"));


response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", Report + "." + "pdf"));

it works now and downloaded with correct file name of "report" + .pdf

I just wonder why IE can keep the file type pdf with page name of generating report while Edge does not.

0 Votes 0 ·

I suggest you please provide the sample code that can help us to reproduce the issue on our end.
Without the test code, it is hard for us to reproduce the issue.
It may help to narrow down the issue.

0 Votes 0 ·

Is it a PDF file embedded into the website?
Are you using any other PDF reader like Adobe Reader?

0 Votes 0 ·

0 Answers