How to Fix a Corrupted PDF on Mac

Repair a damaged or corrupted PDF that will not open on Mac. Recovery methods using Preview, Chrome, online tools, and command-line.

To fix a corrupted PDF on Mac, try opening it in a different viewer first — Preview, Chrome, or Adobe Acrobat Reader. Different apps have different levels of tolerance for PDF errors. If one app rejects the file, another may open it with partial recovery. For more severe corruption, use a dedicated repair tool or extract what you can.

Why PDFs get corrupted

  • Incomplete download: The download was interrupted. The file is truncated.
  • Transfer error: The file was damaged during email, USB, or network transfer.
  • Disk error: A bad sector on the storage drive corrupted part of the file.
  • Software bug: The PDF was created by buggy software that produced invalid structure.
  • Interrupted save: The app crashed or the Mac shut down while saving the PDF.

Step 1: Try different viewers

Each PDF viewer has different error tolerance:

  • Preview: Strict. Rejects many corrupted files outright.
  • Chrome/Safari: Open the PDF by dragging it into the browser. Web browsers often render partially damaged PDFs that Preview refuses.
  • Adobe Acrobat Reader: The most tolerant viewer. Acrobat was designed by the creators of the PDF format and handles edge cases that other viewers do not.

If any viewer opens the file, immediately export or print it to a new PDF (File → Print → PDF → Save as PDF). The new file will be a clean, valid PDF.

Step 2: Re-download or request the file again

If the corruption came from a download or transfer, the simplest fix is getting a fresh copy. Re-download from the source, ask the sender to email it again, or check if the file exists in a different location (cloud backup, email attachment, download history).

Step 3: Use Ghostscript to repair (command line)

Ghostscript can often recover corrupted PDFs by re-interpreting and rewriting the file:

  1. Install Ghostscript: brew install ghostscript
  2. Run: gs -o repaired.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress damaged.pdf

Ghostscript reads the PDF structure, ignores errors where possible, and writes a new valid file. This fixes many structural issues — broken cross-references, missing objects, and truncated streams. It does not recover data that is genuinely missing from the file.

Step 4: Online repair tools

Services like iLovePDF and PDF2Go offer PDF repair tools. Upload the damaged file, and they attempt to reconstruct it. For non-sensitive documents, this is worth trying. The file gets uploaded to external servers, so avoid this for confidential content.

Step 5: Extract what you can

If the PDF cannot be fully repaired:

  • Extract text: Open the file in a text editor (TextEdit → File → Open, set format to Plain Text). You will see raw PDF data, but searchable text strings are visible among the code.
  • Extract images: Tools like pdfimages (from Poppler, installable via Homebrew) can extract embedded images even from partially corrupted PDFs.
  • Partial render: If a viewer opens some pages but not others, print only the working pages to a new PDF.

Preventing PDF corruption

  • Verify downloads complete fully before closing the browser
  • Use "Save As" periodically when editing, creating checkpoint copies
  • Keep backups (Time Machine, iCloud, external drive)
  • Do not eject USB drives or external disks while PDFs are open
  • Avoid editing PDFs on network drives with unreliable connections

Frequently asked questions

Can I always recover a corrupted PDF?

Not always. If the file is severely truncated or the data is overwritten, recovery is impossible. Mild corruption (broken structure, bad cross-references) is usually repairable. Severe corruption (missing pages of data) is not.

Why does Preview say "The file is damaged and could not be repaired"?

Preview is strict about PDF compliance. The file has structural errors that Preview cannot work around. Try Chrome or Acrobat Reader, which are more forgiving.

Is there a free PDF repair tool for Mac?

Ghostscript (free, open source, via Homebrew) is the most capable free option. Chrome and Acrobat Reader (both free) can sometimes open corrupted files that Preview rejects.