PDF from Email Is Corrupted: How to Fix or Recover
A PDF that arrived corrupted via email is one of the most common file repair scenarios, and one of the most easily resolved. In nearly every case the file itself was fine when sent — something altered it during transit. That makes the most useful first step the simplest: get a fresh copy. This guide covers the practical fix path for email-corrupted PDFs, why email transit damages files in the first place, and what to do when re-requesting the file isn’t an option.
Quick fix
- Ask the sender to resend the file. This sounds trivial but resolves the problem more than half the time, because the sender’s copy is intact and a second send often takes a different transit path.
- If a fresh send isn’t possible, download the attachment again from the original email. Some mail clients save attachments incompletely on first try, particularly on flaky connections or with large files.
- Compare the file size on disk against the size shown in the email. A noticeable mismatch confirms the file is truncated, and the next sections describe what to do.
If the resent copy opens cleanly, you’re done. The original was a transit casualty.
If that didn’t work
Open the email in a different mail client and save the attachment from there. Webmail interfaces (Gmail web, Outlook on the web) and desktop clients (Outlook, Apple Mail, Thunderbird) handle MIME-encoded attachments slightly differently, and a file that decodes wrong in one client sometimes decodes correctly in another. This is especially worth trying if the sender’s mail server is known to apply scanning or rewriting policies.
If the file still opens corrupted, attempt a structural repair with qpdf:
qpdf --linearize input.pdf output.pdf
This rebuilds the cross-reference table from scratch and resolves the most common form of structural damage that email transit produces — a truncated or partially-rewritten xref. If qpdf reports warnings but still produces output, open the result and verify the content looks right. See the complete guide to qpdf for diagnostic options if you want to understand what qpdf found before applying a fix.
Advanced recovery
When qpdf can’t recover the file and a fresh copy isn’t available, Ghostscript can re-render the document, producing a new PDF from whatever pages it can interpret:
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Be honest with yourself about what this loses: form fields, annotations, digital signatures, bookmarks, and any tagged accessibility structure are commonly stripped. For a contract or signed document, this means losing the legal validity of the signature. Use Ghostscript only when the visual content is what you need and you’ve confirmed no clean copy exists.
Why this happens
PDFs travelling via email pass through several systems that can modify them, and each is a potential source of corruption.
The most frequent cause is MIME encoding error. Email cannot transmit raw binary data, so attachments are encoded — usually as base64, occasionally as quoted-printable for older systems. A correctly-encoded file decodes back to its exact original bytes; an incorrectly-encoded one doesn’t. Bugs in mail clients, line-ending differences between systems, and encoding-mismatch between sender and receiver can all corrupt the decoded output. The file size on receipt typically differs from what was sent.
The second common cause is email gateway modification. Many corporate email systems run attachments through scanning, filtering, or rewriting layers — antivirus, data-loss prevention tools, “safe link” rewriters. Sometimes these tools modify the file in ways the original sender didn’t anticipate, replacing parts of the structure with scan markers or reformatting metadata. The result is a file that looks like a PDF but no longer parses as one.
The third cause is transmission truncation, particularly for large attachments. If the connection drops partway through the upload to the sender’s server, or partway through the download from the receiving server, the file is incomplete. Most mail clients don’t verify attachment completeness against the declared size; you only discover the truncation when you try to open the file.
A less common but worth-knowing cause is server-side re-encoding for size limits. When an attachment exceeds the recipient’s mailbox limit, some email systems automatically re-encode or compress the file to fit. The re-encoded output may not be a valid PDF, even though the email containing it arrives normally.
Preventing this in future
For PDFs that genuinely matter — contracts, tax documents, important reports — sending them as email attachments is increasingly the wrong choice. Cloud storage links (OneDrive, Google Drive, Dropbox) sidestep all the transit failure modes described above: the sender uploads once, the recipient downloads directly from the storage service, and there’s no MIME encoding, no gateway scanning of the file payload, and no truncation risk.
When email is unavoidable, a few practices reduce the risk. Compress the file into a ZIP archive before sending; the ZIP wrapper prevents most gateway modifications and adds a CRC check that catches transit corruption. Confirm receipt by file size, not just “did the email arrive” — if your file was 2.4 MB and the recipient sees 2.1 MB, something is wrong. For very large files, send them in pieces or via a file transfer service designed for the purpose.
Related issues
If your PDF won’t open at all and you suspect the email is the source, the PDF won’t open guide covers the broader diagnostic sequence. If the file opens but displays incorrectly — blank pages, missing fonts, broken images — those symptoms have their own targeted guides linked from the PDF repair pillar. And if you’re regularly receiving corrupted PDFs from a specific sender or system, that’s a process problem worth raising with their IT team rather than a per-file repair issue.
Last verified: April 2026