PDF

PDF From Email Won't Open: How to Fix Corrupted Attachments

Most PDFs from email that won’t open are victims of transport, not bad files. Email was designed to move text, and attachments travel through it in an encoded form that multiple relays along the way may rewrite, scan, or truncate. The first fix is almost never a repair tool — it’s re-obtaining a clean copy. When that’s not possible, standard structural repair handles most remaining cases.

Quick fix

  1. Download the attachment properly, not from the preview pane. In Outlook desktop, right-click the attachment and choose “Save As” rather than opening directly. In Gmail, use the download arrow on the attachment rather than the preview. In Outlook Web, click the dropdown on the attachment and choose “Download.” These take different code paths internally, and the “proper download” route often produces a clean file when the preview-opened version fails.
  2. Try opening the downloaded file in a browser. Drag the downloaded PDF into Chrome, Firefox, or Edge. If it displays there, the file is fine and your PDF reader is the problem — not email transport.
  3. Check the file size. If the sender told you the file is 2.4 MB and your downloaded copy is 1.8 MB, the download is incomplete. No amount of repair will reconstruct the missing bytes — you need a fresh copy.

If that didn’t work

If the file arrived damaged, email transport is the likely culprit and sending the same file through the same path will often produce the same result. Ask the sender to:

  • Send via a cloud link (Google Drive, OneDrive, Dropbox, WeTransfer) rather than as an attachment. This bypasses email attachment handling entirely.
  • If they must send by email, try a ZIP wrapper. Some corporate email gateways treat raw PDFs more aggressively than other file types; a ZIP sometimes passes through cleanly when the original PDF did not.

This sounds like advice-avoidance, but it is genuinely the correct first move when transport corruption is suspected. Repair tools work on damage that’s already happened; they can’t reconstruct bytes that were never received.

Clear Outlook’s Secure Temporary File Folder

Outlook desktop opens attachments in a hidden temporary folder called the Secure Temporary File Folder (OLK folder on older versions). This folder can become full, locked by another process, or silently corrupted. When that happens, attachments that open from the preview pane fail even though the underlying email has the file correctly.

On Windows:

  1. Close Outlook.
  2. Open Registry Editor (regedit).
  3. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\[version]\Outlook\Security — the [version] is 16.0 for Office 2016, 2019, 2021, and Microsoft 365; 15.0 for Office 2013; 14.0 for Office 2010.
  4. Note the value of OutlookSecureTempFolder.
  5. Close Registry Editor, open File Explorer, and navigate to that path.
  6. Delete the contents of the folder (not the folder itself).
  7. Reopen Outlook and try the attachment again.

On macOS, Outlook uses a different attachment cache managed automatically by the system; restarting Outlook and the computer is the equivalent step.

Run a structural repair with qpdf

If re-downloading and alternative readers have failed and you can’t get a fresh copy from the sender, run the standard structural repair:

qpdf --linearize input.pdf output.pdf

Transport-corrupted PDFs often have structural damage to the xref table — exactly what qpdf rebuilds. If the transport damage is in the content streams rather than the structure, qpdf will report warnings and produce an output that may still be incomplete. See the complete guide to qpdf for the full range of repair options.

Advanced recovery

Transport corruption is unusual in that it can damage any part of the file — there’s no pattern that restricts it to the xref table. If qpdf --linearize produces a file that still won’t open or shows obviously missing content, Ghostscript re-rendering is worth trying but often fails for the same reason: if the content streams themselves are damaged mid-file, Ghostscript can’t re-render what it can’t read. Transport corruption is frequently the case where “the file is unrecoverable” is the honest answer, and re-obtaining the file from the source is the only path.

If the sender no longer has the original — unusual but it happens with emailed invoices or receipts — check whether the email provider retains the attachment independently. Gmail stores attachments server-side and sometimes allows re-downloading via “Download original” even after the local copy has been damaged. The provider’s own copy may still be clean even when yours is not.

Why this happens

Email attachments are base64-encoded — binary files are translated into plain text using a six-bit-per-character encoding so they can travel through email systems that were designed for text. This encoding is lossless in theory. In practice, the round trip from sender’s client through potentially many mail relays to your client has multiple failure points.

Gateway scanning and rewriting. Corporate email gateways (Mimecast, Proofpoint, Barracuda, and the built-in scanning in Exchange and Google Workspace) inspect attachments for malware. Some of these systems don’t just scan — they rewrite, re-encode, or replace parts of attachments. A well-behaved scanner leaves the bytes unchanged; a badly-behaved or misconfigured one doesn’t.

Attachment size limits. Gmail has a 25 MB send limit and converts larger attachments to Drive links. Outlook.com and Exchange Online have configurable limits typically in the same range. Files near the limit are sometimes processed differently than files well below it, and the edge cases occasionally produce truncation.

Client-side temp folder issues. Outlook desktop’s Secure Temporary File Folder can fill up, become locked, or be corrupted by an interrupted sync. When it does, attachments that open from the preview pane fail even though the underlying email is fine. The “proper download” workflow avoids the temp folder entirely.

OneDrive sync conflicts. When Outlook is configured to save attachments directly to OneDrive, an attachment opened at the same moment OneDrive is mid-sync can produce a partial file. Opening the attachment after sync completes, or downloading it to a local folder first, avoids this.

Gmail forwarding and filters. Filters that forward messages to other addresses sometimes handle attachments inconsistently, particularly for very large or unusual file types. The forwarded copy can differ from the original in ways that aren’t obvious from the headers.

Preventing this in future

For any file that genuinely matters — a contract, a tax document, an invoice your business depends on — don’t rely on email as the primary delivery method. A cloud link (Drive, OneDrive, SharePoint, Dropbox) bypasses email transport entirely and is immune to the corruption paths above. If email is unavoidable, send a ZIP archive instead of a raw PDF; gateways treat ZIPs more consistently, and the ZIP’s own integrity check will reveal transport damage immediately.

On the receiving side, always download important attachments to a local folder before opening them. Dragging them out of the preview pane or opening them in-place goes through the temp folder path, which has more failure modes than a direct download. For workflows with heavy attachment use, consider tools that download attachments automatically out of your inbox — the batch-download path is more reliable than ad-hoc opens.

If the attachment opened but shows blank or black pages, transport corruption damaged the content streams rather than the structure — see PDFs that open blank or black. If you’re seeing a specific error message like "The file is damaged and could not be repaired", the error-specific guide covers the targeted fix path. For any PDF that won’t open regardless of source, the general guide to PDFs that won’t open is the full diagnostic sequence.

Last verified: April 2026