.pdf

What is a .pdf file?

Portable Document Format · Document · Adobe · 1993

PDF is the universal format for documents that must look identical everywhere. It locks in fonts, layout and images so a file prints and displays the same on any device, which is why it dominates contracts, forms and manuals.

Category
Document
Type
Binary
Is a .pdf file safe to open? Usually safe, but PDFs can contain scripts and links. Open unexpected PDFs in a browser or reader with JavaScript disabled, and be wary of ones from unknown senders.

What is a .pdf file used for?

A PDF captures a document as a fixed page layout, embedding the fonts and images it needs. Open it on any phone, computer or printer and it looks the same.

PDFs can hold selectable text, scanned images, form fields, digital signatures and even attachments, which is why they suit everything from invoices to legal filings.

The trade off is that editing a PDF is harder than editing a word processor file. For heavy edits, people export a fresh PDF from the source document.

What opens a .pdf file?

The .pdf format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.

Windows

  • Edge
  • Adobe Reader
  • any browser

macOS

  • Preview
  • Safari
  • Adobe Reader

Linux

  • Evince
  • Okular
  • Firefox

Web

  • Every browser

Open a .pdf file step by step

  1. Confirm the file really is a .pdf. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
  2. On Windows, open it with Edge or Adobe Reader.
  3. On Mac, use Preview or Safari.
  4. On Linux, try Evince or Okular.
  5. Still stuck? Convert the .pdf to DOCX, which opens more widely.

Why can't I open my .pdf file?

Almost always because no installed app understands PDF. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.

The other possibility is that the file is not really a .pdf at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.

How to convert a .pdf file

You can convert a .pdf file to DOCX, JPG, PNG, TXT.

LibreOffice Draw opens a PDF and lets you export the text; for scanned PDFs you need OCR first, and Tesseract does that for free. A PDF-to-DOCX conversion is always a reconstruction, never a recovery of the original document.

What is the .pdf file signature (magic bytes)?

A .pdf file starts with the hex bytes 25 50 44 46 2D, which read as %PDF- in ASCII. Programs identify PDF by those bytes, not by the filename, so a renamed file still gives itself away.

These are the documented signatures for PDF. For a full breakdown, see the PDF file signature page.

Documented magic-byte signatures for the .pdf format
Hex signatureOffsetASCIINote
25 50 44 46 2D0%PDF-'%PDF-'
25 25 45 4F 46end of file%%EOF%%EOF closes the file

PDF also ends with a trailer. The bytes 25 25 45 4F 46 appear at the end of the file, so a truncated download is spotted by checking the last bytes as well as the first.

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .pdf file?

PDF is the universal format for documents that must look identical everywhere. It locks in fonts, layout and images so a file prints and displays the same on any device, which is why it dominates contracts, forms and manuals.

How do I edit a PDF?

Use a PDF editor like Acrobat, or convert it to DOCX, edit in Word, and export back to PDF. Simple text tweaks are possible in many browsers and readers.

Are PDFs safe to open?

Generally yes, but they can carry embedded scripts. Keep your reader updated and be cautious with PDFs from unknown sources.

Comparisons

Related formats