Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problem opening PDF files with Preview

Occasionally I get this message when trying to open a PDF file in an email attachment:

"it may be damaged or use a file format that preview doesn't recognise"


However, when I open the same attachment on my iPad, using GoodReader it does open, so the file is not damaged.


The issue seems to be with Preview and started recently (after new Mac updates maybe).


I don't want to post the PDF file here since it's company property.


Any suggestions ?

Posted on Jul 26, 2014 4:00 PM

Reply
27 replies

Jul 26, 2014 4:52 PM in response to jazzizgreat

Please follow these directions to delete the Mail "sandbox" folders. In OS X 10.9 there are two sandboxes, while in 10.8 there is only one. If you're running a version older than 10.8, this comment isn't applicable.

Back up all data.

Triple-click anywhere in the line below on this page to select it:

~/Library/Containers/com.apple.mail

Right-click or control-click the highlighted line and select

Services Reveal

from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected foldernot just its contents—to the Desktop. Leave the Finder window open for now.

Log out and log back in. Launch Mail and test. If the problem is resolved, you may have to recreate some of your Mail settings. You can then delete the folder you moved and close the Finder window.

This action will delete any custom Mail stationery that you have created. If you want to preserve it, ask for instructions.

If you still have the problem, quit Mail again and put the folder back where it was, overwriting the one that may have been created in its place. Repeat with this line:

~/Library/Containers/com.apple.MailServiceAgent

Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.

*If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select

Go Go to Folder...

from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

Jul 26, 2014 5:31 PM in response to Linc Davis

I started following tour instructions but have made a mistake, and need some advice before I continue please:


I moved the folder "com.apple.mail" to the Desktop as per your instructions, but instead of "Log out and Log back in" I rebooted by mistake.


Anyhow, I opened Mail but I still get the same error so problem not solved yet.


I noticed that my Mail looks different and folders arranged differently, so wondering if I could move the new "com.apple.mail" to the Desktop and return the old one to it's original folder ?

Jul 27, 2014 8:37 AM in response to jazzizgreat

Did a search on Good Reader application - and it is designed specifically for IPAD and IPHONE - doesn't say anything about laptop/desktop.


As you have GoodReader on your Mac - did you buy it from the APP STORE $4.99 - did it come with the Mac update - or did you download for free somewhere? If you did download it - in relation to your problems when did it start?


-- Just remembered I have some XLS files that I converted to Numbers but kept the original anyway. Good Reader does open those on IPAD etc so you apparently can modify them and send them around .


Reason for question about where you got it - never a good idea to get it from a free site as it may have been tampered with enough to get you to accept something you don't want.

Jul 27, 2014 8:46 AM in response to jazzizgreat

Back up all data.

This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.

Step 1

If you have more than one user, and the one in question is not an administrator, then go to Step 2.

Triple-click anywhere in the following line on this page to select it:

sudo find ~ $TMPDIR.. -exec chflags nouchg,nouappnd,noschg,nosappnd {} + -exec chown $UID {} + -exec chmod +rw {} + -exec chmod -N {} + -type d -exec chmod +x {} + 2>&-

Copy the selected text to the Clipboard by pressing the key combination command-C.

Launch the built-in Terminal application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.

Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.

You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.

The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.

Step 2 (optional)

Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.

Start up in Recovery mode. When the OS X Utilities screen appears, select

Utilities Terminal

from the menu bar. A Terminal window will open. In that window, type this:

res

Press the tab key. The partial command you typed will automatically be completed to this:

resetpassword

Press return. A Reset Password window will open. You’re not going to reset a password.

Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.

Select your username from the menu labeled Select the user account if not already selected.

Under Reset Home Directory Permissions and ACLs, click the Reset button.

Select

Restart

from the menu bar.

Jul 27, 2014 5:35 PM in response to Linc Davis

Thank you Linc for all your help thus far, but nothing yet has solved the problem.


I have tried something different but first some facts to consider:

1. The pdf files were emailed to me from a colleague using an iPad with GoodReader.

2. The pdf files can be opened on my iPad using Mail directly or GoodReader.

3. I was able to open some of the email attachments on my iMac using Mail/ Preview but not all, hence my post.


I have since forwarded the problematic emails (with pdf attachments that I could not open on my iMac), to the same email account using my iPad and noticed the following:

1. The attachments now were larger in size (more bytes).

2. I am able to open these larger files on my iMac.


It would seem that the first set of attachments that I could not open may have been corrupted somehow ??


If this was just a one off occurrence I would not be concerned, but this is happening quite often.


I seem to have found a work around, but does anyone have any idea what would cause this?

Jul 27, 2014 6:10 PM in response to jazzizgreat

Disclaimer: I know almost nothing about programming or the inner workings of computers but...


I was working on a project and downloaded four image/text files and had this same issue with a couple of different formats in Preview and Adobe Acrobat: PDF, JPEG, and a PNG. I got that same exact error. I also got the same exact error with a .lwo object file when opening it in Blender (CGI program) during the same session.


The files were downloaded originally and opened on a Linux machine and everything worked. When I transferred them to a flashdrive and brought them to my mac I got the same error messages.


I ended up going back to the source sites and re-downloaded them and then they worked (on both Linux and Mac). Can't explain it so...


If all else fails try re-downloading the document from the original source and try again.

Problem opening PDF files with Preview

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.