升级

What happens when you open a file?

A computer user, whether it be Windows or Mac, will have a default application to open certain files. In Windows, if you open a PDF without installing a third party application, it will automatically lead it to a web browser since web browsers are the closest thing to a reader. This only happens to PDFs but not to other file formats. A computer determines how it will open from its indicator, which is the file extension. If you want to understand the technical process of how files opens in a computer, then read on..

Published 27 Mar 2021

A computer user, whether it be Windows or Mac, will have a default application to open certain files. In Windows, if you open a PDF without installing a third-party application, it will automatically lead it to a web browser since web browsers are the closest thing to a reader. This only happens to PDFs but not to other file formats. A computer determines how it will open from its indicator, which is the file extension. If you want to understand the technical process of how files open in a computer, then read on..

oepning a PDF file

What is a file extension?

File extensions make it possible for a computer to determine what kind of format the file is and what actions to take to open the file. File extensions let the operating system decide what applications to use. These extensions are programmed to certain applications so that the computer can automatically open the file associated with it. File extensions can be found at the end of the file name, which we see after the period. For example, if you have a Word document or a DOC file, the file extension for your file would be .doc at the end of the file name. File extensions are also known as the file format that talks about the structure and layout of a file. It reveals how the data is organized.

file extensions determine the file type

What happens when a file is opened?

Each operating system has its technical process but generally, when you open a file, it follows the file extension and the directory. Each file contains an inode number and file name. An inode number is an identification number per file. Opening a file means activating a file descriptor that follows the inode number associated with the file name.

In a process, it would more or less look like this:

  • When a file is clicked by the user to open, the C library requests the operating system to open the file
  • Computer checks if it is allowed to open/create/overwrite the file in the program
  • It will read permission and check with the operating system if allowed
  • If not allowed, an error message will appear to the requester
  • If allowed, the operating system starts up the application that is assigned to it by looking at the file extension
  • Another request is made by the file system to open in writable mode
  • The computer assigns a section of its RAM to the opened file and application
  • The computer looks into the file system to find its location and gets data from there. It copies bytes into the assigned application RAM up to its end of file code.
  • The application breaks the ASCII Characters or the number of data into individual bytes and displays the content that corresponds to the numeric data. These values are interpreted so the file format will be opened using the application.
  • If the wrong application is used to open the file, the program will only interpret the file as it was programmed to do so however, it does not mean that it will open it correctly.  For instance, if an image file was placed with a .txt file extension, notepad will open and it will display a series of ASCII codes instead of the photo.

Sometimes, programs and applications still open other file formats when commanded by the user and it may or may not prompt a warning. When the file has the wrong file extension, the program can still open it. This is because the program can still read and see bits in the file that it recognizes. If the file is unrecognizable, the user will need to specify what program should be used to open and work with the file.

why PDFs automatically open in my browser

Why does my PDF still open automatically in my browser?

If you click your PDF file and it automatically opens in a browser without your consent, a default has been set by the manufacturer or by the operating system. For example, in Windows, PDF documents open in Microsoft Edge even if a PDF reader is already installed. This is because Microsoft Edge is the default PDF reader for Windows.

Don’t worry though, changing your default application or reader can be done in your settings. Read more here: How to change default PDF reader

How to convert any file into PDF?

Various applications nowadays have built-in converters that allow you to save or export your file into PDF. However, if you possess a file sent by your colleague and you do not have the same application, this might be a hindrance for you to convert it directly on your processor. For instance, if you’re using Libre office and your colleague is using MS Office, the content’s layout may not always turn out the way it should. The best way to ensure the content is in place is by converting with a reliable PDF converter like DeftPDF.com

To convert your documents and presentations to PDF simply go to the website, select the proper tool, upload the file and click convert! Once the process is complete, you can download the file or upload it to your online storage. It’s that easy!

 

 

Want to get updates and subscribe to our blog? Get weekly e-notifications by creating an account with us:  DeftPDF online

close
close
close