Manatee

A PDF that broke after you saved changes to it in Preview

If a PDF opened fine, you edited it in Preview, and now it will not open, shows blank pages or has lost pages, the first thing to try is the version from before your edit. Preview keeps earlier versions of documents on your Mac’s disk: open the file and choose File, Revert To, Browse All Versions. If Preview cannot open the file at all, Time Machine or the place the PDF came from is the next stop. Repair is the last resort, for when no earlier copy exists.

What happens when Preview saves a PDF

Preview does not tack your changes onto the end of the file. It writes a fresh PDF from its own reading of the original, with your annotations, signatures, rotated pages or deleted pages included. With ordinary PDFs this works well. Two things can make it go wrong.

  • The save was interrupted. The Mac went to sleep or shut down, the disk ran out of space, or the file lived on an external drive, network share or USB stick that disconnected partway through. A PDF written halfway is missing the parts at its end that tell an app where each page is.
  • The PDF used features Preview does not fully carry across. Complex interactive forms, layers, embedded media and some kinds of annotation can come out different, or missing, after Preview has rewritten the file.

Preview also saves on its own. Edits are saved as you work and when you close the window, so the original may have been replaced even though you never chose Save.

Step 1: get the earlier version back

If the PDF still opens in Preview:

  1. Open it and choose File, Revert To. If you opened it in this session, Last Opened takes you back to how it was at that point.
  2. Otherwise choose Browse All Versions. The current file appears on the left and earlier versions stack up on the right, with a timeline down the edge of the screen.
  3. Step back through the timeline to a version from before the edit.
  4. Click Restore to replace the current file. To keep both, hold down the Option key and click Restore a Copy.

Versions are kept on the disk the file lives on. A PDF edited directly on an external drive, a USB stick or a network share may have none.

If Preview will not open it at all, Revert To is not available, because it needs the document open. Try these instead, in order:

  • Time Machine. Select the PDF in Finder, click the Time Machine icon in the menu bar and choose Browse Time Machine Backups. Go back to a time before the edit, select the file and click Restore.
  • The source. If it came as an email attachment, the message in Mail still has the original: save the attachment again. Downloads can be downloaded again. Scans can be rescanned. Senders can resend.

Any of these gives you the file as it was, and you can redo the edit on a copy.

Step 2: repair the damaged file when there is no other copy

If there is no earlier version anywhere, the damaged PDF is what you have, and the question becomes how much of it is still readable. Manatee repairs PDFs and tells you plainly what it managed:

  1. Drag the PDF onto Manatee’s menu bar icon, or right-click it in Finder and choose Services, Fix with Manatee.
  2. Manatee works through what is left and writes the result as a new PDF next to the original.
  3. The result is one of three: Fixed, Partial (for example 34 of 41 pages), or Not fixable.

The damaged file is never modified, so you can still take it elsewhere afterward. Everything happens on your Mac with nothing uploaded, which matters for the contracts, tax forms and medical letters people usually edit in Preview. Manatee is free for 24 hours with every feature, then $9 once.

Be realistic about a Partial result. Pages whose data was written completely come back; pages that were never written cannot, and edits you made to those pages are gone with them. If Finder shows the PDF as zero bytes, nothing was written at all, and there is nothing to repair: Time Machine or the source is the only way back. Partial recovery explained goes into what the numbers mean, and how to repair a corrupted PDF covers PDF damage from other causes.

Problems that look like damage but are not

Some changes after a save in Preview are expected behavior rather than a broken file.

  • Filled-in form fields look empty in another app. The answers are in the file, but not every app displays form data the same way. To make them part of the page, choose File, Print, open the PDF menu at the bottom of the print dialog and choose Save as PDF. The new copy shows the answers as ordinary page content everywhere.
  • A digital signature now says it is invalid. Any change to a signed PDF breaks its signature; that is what the signature is for. You need the signed original, not a repair.
  • The file got much bigger or smaller. A rewrite can change the size without anything being wrong. If you exported with the Reduce File Size filter and the images now look blurry, that is the filter, not damage; how to compress a PDF on a Mac covers gentler options.
  • Pages look blank in Preview but fine elsewhere. That is a display problem, covered in a PDF that opens with blank pages in Preview.

How to edit PDFs in Preview without risking the original

A few habits take the risk out of it.

  1. Edit a duplicate. Before you change anything, choose File, Duplicate, or select the PDF in Finder and press Command-D. Edit the copy and keep the original untouched until you are happy.
  2. Write to a new file. File, Export as PDF saves your edited version as a separate file and leaves the one you opened alone.
  3. Make Preview ask before saving. In System Settings, Desktop and Dock, turn on Ask to keep changes when closing documents (on macOS Monterey it is in System Preferences, General). Closing a document then asks whether to keep your edits.
  4. Edit on the Mac’s own disk. Copy the PDF from an external drive or network share to your Mac, edit it there, and copy it back once it is saved and checks out.

Questions

Can I undo the changes after closing the PDF? Not with Edit, Undo; the undo history ends when the window closes. File, Revert To, Browse All Versions is how you step back after that.

Why did Preview save the file when I never clicked Save? Preview saves automatically, like most Mac document apps. Turning on Ask to keep changes when closing documents, as described above, puts the decision back in your hands.

Will a repair bring back my annotations? Only if the parts of the file holding them survived. Repair recovers what is intact; it cannot recreate edits that were never written.