Why PDF can’t open in MS edge in http server

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
303218145
Posts: 2
Joined: Tue Mar 05, 2024 1:09 am

Why PDF can’t open in MS edge in http server

Post by 303218145 »

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.
Image
My OS is win7.I want to get the result,pdf opens in the way of the following figure.
Image
Please teach me how to do it,thank you.
void
Developer
Posts: 15353
Joined: Fri Oct 16, 2009 11:31 pm

Re: Why PDF can’t open in MS edge in http server

Post by void »

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
You may also need to adjust your web browser to show application/pdf (instead of download).
303218145
Posts: 2
Joined: Tue Mar 05, 2024 1:09 am

Re: Why PDF can’t open in MS edge in http server

Post by 303218145 »

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:
  • 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
You may also need to adjust your web browser to show application/pdf (instead of download).

Ok,the problem has resoloved.Thanks very much!
Post Reply