36

I experienced a behaviour I've never seen before when opening, editing and saving a PDF today. As soon as save the PDF with Preview the file will be password protected, and I cannot open it again.

I've tested this on multiple files, but it seems to only affect files that have an "administrator password" set.

Test files from the Swedish Social Insurance Agency: https://www.forsakringskassan.se/wps/wcm/connect/b581c10a-8782-4c84-8448-4a469b85422b/fk7457-004-f-002.pdf?MOD=AJPERES&CVID=&CACHE=NONE&CONTENTCACHE=NONE

https://www.forsakringskassan.se/wps/wcm/connect/def06bb9-268f-47bd-a99d-2aa3dd75f855/fk7804-004-f-001.pdf?MOD=AJPERES&CVID=

Is this behaviour somehow by design? I've never seen it before, and at first I suspected that some kind of malware caused this. But now I'm not so sure anymore.

I'm using macOS Monterey 12.2.

IconDaemon
  • 19,234
c3p0
  • 461
  • 1
  • 4
  • 3
  • Did you figure out how to get around this? I'm trying to edit a govt related doc which I've edited before but now it's always getting locked when I save changes. It won't accept the Mac password as the password either – Chirath Jun 06 '22 at 10:46
  • 2
    Hi @Chirath, didn't find any solution no. I think it's a bug in Preview – Perennialista Jun 06 '22 at 15:38
  • Running into the same thing on MacOS Monterey 12.6 (21G115). Crazy – Luca Steeb Oct 26 '22 at 15:09
  • Yep, Australian immigration forms do these and now I can't access the pdfs anymore. Preview is garbage software. Who thought it's a good idea to password protect the pdf without the user's knowledge or input? – user3893988 Apr 13 '23 at 05:37
  • I have the same problem (MacOS Ventura 13.2.1). I tried my account password but it didn't work, looked in keychain but couldn't come up with a solution. Using Acrobat Reader instead of Preview works fine for new pdf files, but I would be interested to open the pdf files that have been protected by Preview. – matslew Apr 14 '23 at 14:44

10 Answers10

15

I have the same problem with documents from the Australian government on macOS Monterey 12.5 with Preview Version 11.0 (1033.4).

My current workaround is to open and edit the document in Chrome and then save it with my edits. This results in a saved file that I can view without a password.

Mo.
  • 251
  • 3
    I had the same problem with Australian government documents, like Medicare. Ended up installing Adobe Acrobat Reader that let me save without encrypting. – thameera Oct 07 '22 at 12:35
8

I have the same problem with Australian Government forms on my MacOS Monterey 12.6 and Preview 11.0 (1033.4). I think I've found the best workaround which still allows editing after re-opening the document; by expanding a bit from Cailean's answer:

  1. Open the PDF. You can start filling the fields but DON'T save it

  2. Hit File > Export... > Permissions...

  3. Type in 'Owner Password' (any password will work)

  4. Above 'Owner Password', make sure to tick all the checkboxes under 'Permissions'. These will allow changes to be made without entering password in the future. Preview allow all permissions

  5. Hit Apply > Save. You can save the file with the same name, just confirm the overwrite by clicking the 'Replace' button.

  6. Fill up the PDF fields and save normally.

  7. Close the document and re-open it, it shouldn't ask for password and you should still be able to edit it just fine.

ABVincita
  • 221
  • 2
  • 3
6

I called the Immigration Department (Australian Government) and they can't give me a password for the document.

Here's the solution: open the PDF with Adobe Acrobat Reader, edit it with Acrobat, save it with Acrobat. This is the only 'supported' PDF reader.

I downloaded the form again and tired Acrobat; it works.

I downloaded a new form again and tried it with MacOS Preview; it password protects on save.

Further investigation shows that the password is applied (not sure of the correct word) as soon as you edit/save with Preview. Acrobat does not do this.

Preview is clearly broken and should never be trusted with anything important again.

I can't even verbalise my level of anger over this.

csilk
  • 161
  • 1
    I'm seeing a slightly different issue: a password-protected document, after saving it with Preview, now has a different password, no idea which. Clearly, Preview is bugged there. – Victor Sergienko Mar 27 '23 at 06:21
4

The bug in Preview is that if the original PDF had an owner password that prevented some actions but still allowed you to view and fill forms, when Preview saves or exports the file, it sets that password for ALL actions, thus locking up the file from even being viewed without the owner password.

For example, if the original file has an owner password set to prevent inserting or deleting pages:

(Click "Tools > Show Inspector > icon" to see this dialog.)

Preview's Encryption Inspector showing one permission denied.

Then the file saved by Preview will have ALL permissions denied:

Preview's Encryption Inspector showing all permissions denied.

Has this bug ever been reported? I don't know.

Will Apple ever fix this bug? I don't know.

PS: One way to circumvent is to use the "Print" option then click the PDF button in the Print dialog. This creates a new PDF that's not form-editable, but you can still view it, and there's no password of any kind in it. (Note: Be sure to finalize any field you're currently editing by clicking outside it before you use the Print option, or that field will become blank in the printed PDF.)

ADTC
  • 187
3

The pdf was created with security features enabled. Only the creator of the document would be able to change the security settings. The following screenshot shows what can and cannot be done.

enter image description here

agarza
  • 2,274
  • I noticed that there was security settings that couldn't be changed without a password. But I've never before seen a file that will get password protected as soon as I re-save it. I also tested this on one of my older macs (with Big Sur), and there the files saved without needing a password the next time I opened them. Is this a new feature of macOS Monterey? – c3p0 Feb 07 '22 at 21:56
  • 1
    It's not that the new file is being password-protected; the original file needs the password in order to make any changes. The 2nd restriction listed above shows "Not Allowed". The "Content Copying" means that you can copy text from the document. – agarza Feb 07 '22 at 22:01
  • 2
    That would make sense, but it's not what I'm seeing, hence the question. My new file definitely gets password protected. It's enough to just open the file, and re-save it to another location. – c3p0 Feb 07 '22 at 22:12
3

This worked for me when other answers did not.

After opening the file in Preview and typing data into the form, I did the following without saving the document first.

  1. File > Print
  2. In a dropdown that defaulted to PDF, I selected Save as PDF
  3. A new popup appears. Click the Security Options button
  4. A new, new, popup appears (so much fun!)... make sure the boxes are unchecked for required password. Click OK.
  5. Click Save
  6. Click Print

Result: PDF saved with filled-out info and it is able to be opened in Preview again without a password.

Preview: v11.0 (1056.2.4)
MacOS: Sonoma 14.1.1 (23B81)

agarza
  • 2,274
GraehamF
  • 131
  • You don't need steps 3 and 4 unless you're adding a new password. The Print option creates a new PDF from scratch and will always be unencrypted and unprotected by default. It will never copy the password from the original PDF. Also, there's no step 6. – ADTC Jan 20 '24 at 19:13
1

I found 2 things that worked for me:

Option 1

Open pdf in web browser (e.g. Chrome) and print, then "Save as PDF". So, right click the pdf, Open With -> Google Chrome. Then

File -> Print... -> Destination -> Save as PDF

Option 2

The password may be an empty string, i.e. when presented with a password prompt, just hit enter.

So, for me, I opened the file using Adobe Acrobat, went to:

File -> Properties (cmd-D) -> Security -> Security Method -> No Security

screenshot of the Document Properties -> Security pane

It will probably ask you for the owner password at some point; as mentioned, try just hitting ok without typing anything.

In Preview, File -> Enter Password... or File -> Edit Permissions... there's some things you can fiddle around with, but I couldn't figure out how to remove the options entirely.


For background on my issue, when I downloaded my W-2, it was stated to be "password encrypted" and, although it viewed fine in Preview without needing to type in a password, trying to upload it to a Tax Software the software complained that it was password protected so I had to do this to get the tax software to read it correctly.

gchen
  • 11
  • "The password may be an empty string" - You were just incredibly lucky this time. LOL – ADTC Jan 20 '24 at 19:24
  • I was about to add an answer equal to option 1, it worked for me. The pdf does look a little different and the form fields are no longer clickable but luckily for me I've already filled it out – Sam Feb 07 '24 at 19:45
1

Open the browser. Log into Microsoft One Drive. Upload the pdf document to Microsoft One Drive. And open from there. It did open and showed me the contents.

  • It looks like Google Drive would do the trick too. As some other answer suggested, select Print from the PDF preview, print with "Save as PDF". I was able to gain access to the filled PDF locally again. – xyb994 Jan 15 '24 at 04:49
0

I tried the "Export..." option, then clicked on the "Permissions..." button. Entering in an owner password and then clicking "Save" allowed me to re-open the PDF without a password. (Full disclosure: I used my user account password as the owner password, in case that makes a difference.)

-1

Running on Sonoma, I can open, fill the form, save, close and re-open the linked PDFs without problem.

So any bug that might have been in Ventura may have been fixed.

benwiggy
  • 35,635