In everything,I have enabled http server using port 8080. JPG, MP4 and other files can be opened through the Edge browser, but the PDF file can only be downloaded after clicking, and cannot be opened, as shown in the figure below.
My OS is win7.I want to get the result,pdf opens in the way of the following figure.
Please teach me how to do it,thank you.
Why PDF can’t open in MS edge in http server
Re: Why PDF can’t open in MS edge in http server
To set the Everything HTTP Server content type for PDFs to application/pdf, so they open instead of download:
- From the Start menu, search for:
regedit - Right click the Registry Editor and click Run as administrator.
- In the Registry Editor, on the right, navigate to:
HKEY_CLASSES_ROOT\.pdf - On the left, right click and click New -> String Value
- Set the Name of the value to:
Content Type - Set the value data to:
application/pdf
Re: Why PDF can’t open in MS edge in http server
void wrote: ↑Tue Mar 05, 2024 2:15 am To set the Everything HTTP Server content type for PDFs to application/pdf, so they open instead of download:You may also need to adjust your web browser to show application/pdf (instead of download).
- From the Start menu, search for:
regedit- Right click the Registry Editor and click Run as administrator.
- In the Registry Editor, on the right, navigate to:
HKEY_CLASSES_ROOT\.pdf- On the left, right click and click New -> String Value
- Set the Name of the value to:
Content Type- Set the value data to:
application/pdf
Ok,the problem has resoloved.Thanks very much!