Preview Sets or Changes Owner Password Locking PDF Files Without Warning or Confirmation

This has happened to me with multiple PDF files from different sources, although they all happened to originate with the US Federal Government--I read another post about this that mentioned the same source, so that could be a clue. It happened with PDF files attached to an email that I downloaded and files I downloaded directly from a .gov website. I can open and edit the files in Preview up until the first (and last) time I save and close them. After that I'm prompted for a password I don't know because I never set it and I'm locked out. All the work I put into filling out the long (24 pages)government forms was lost and all that time was wasted.


It's not obvious what's happening, so I was blaming the originator of the files even though it didn't seem to make sense. It's the federal government, which is not exactly infallible, but it is huge. Once, I received a PDF file that did have a password set by a 3rd party, and I knew what it was - had it written down and stored. I unlocked the downloaded file just fine using password shared with me and was able to edit, only to find that after saving and closing it, the password had changed, and I could no longer open the file I'd been working on.


I eventually started to suspect something weird was happening and googled the problem. That's how I learned that this bug has been wasting users time and effort for over a decade--the first reference I found to it was in 2012 and I didn't look for the oldest so it could be even longer.


I'm going to share some details in the hopes it'll somehow get the attention of someone at Apple who can open a ticket and get a programmer who works on Preview to look for the bug. I'd be happy to share one of the PDF files I had a problem with or the URL to download it directly. I think the fact that this happens only in Preview and never in Adobe Acrobat means it's a bug, not a feature, since these files were created using Acrobat. It's not what was meant to happen. Even if creators are allowed to set a password for encryption, while setting permissions to allow the next user to open and edit the document without a password, which seems like a logical contradiction, at no time should permissions just switch, locking the file without warning or confirmation--that seems self evident. Also, since Preview has definitely changed a password from a known one to something else, all by itself, I don't think it matters if a password was previously set or not. The bug can overwrite it and also change the permissions, possibly even on open, not save--I'd never had reason to check.


Meanwhile, just hypothetically speaking, if an Apple programmer who happened to work on the Preview team were going to set a password, lets say for testing purposes, what do you suppose that password might be? Knowing the answer could make a lot of people very happy if they haven't already started over with a new file.


I'm running Sonoma (14) on a 2020 Macbook Air and Preview 11, but like I pointed out, this problem has been around for a while.


Here's a screenshot of properties in Preview's Inspector for a file I'm locked out of after editing and saving:

Here's a screenshot of properties in Preview's Inspector for a new download of the same file prior to saving (note that it says it was unlocked with a user password, but I was not prompted for and didn't enter one - I swear):

In between these two states of basically the same file, I did nothing but edit text in fields and save. It saved silently-I wasn't prompted about anything, let alone passwords or permissions.


The downloaded file properties, opened in Adobe Acrobat without supplying a password, saved, closed and reopened, still without a password looks like this:

One might argue that it makes no sense to let users open an encrypted file without giving a password, but that's how it works in Acrobat and having Preview doing it's own thing has created a nightmare of a problem for a whole lot of users for a very long time. Anyway, again, randomly setting passwords to something no one knows is not a feature that works for anyone.

Hopefully there are some clues to go on in what I've shared and someone will care enough to take a crack at fixing this bug before it's a teenager and gets a driver's license, starts voting or drinking in bars and smoking blunts, all tatted up with too many face piercings.


It will help so many people that will never even know how much time they would have lost. They won't be grateful, but they should be, and I thank the person in advance. I recommend a promotion with more pay.


MacBook Air 13″, 14.0

Posted on Jan 8, 2024 12:15 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 26, 2024 01:09 AM

I encountered this same problem - it appears to be related to using the 'form filling tools' in Preview to complete a PDF form

I was able to solve the problem by opening the PDF in another app (MS Edge browser of all things) which displayed the PDF content in full and then using Print to PDF function which printed the full PDF without the usage restrictions or password in place

Similar questions

2 replies
Question marked as Top-ranking reply

Jan 26, 2024 01:09 AM in response to LongDoggie

I encountered this same problem - it appears to be related to using the 'form filling tools' in Preview to complete a PDF form

I was able to solve the problem by opening the PDF in another app (MS Edge browser of all things) which displayed the PDF content in full and then using Print to PDF function which printed the full PDF without the usage restrictions or password in place

Jan 8, 2024 10:31 AM in response to LongDoggie

Adobe Acrobat Pro is a true PDF Editor that gives you more PDF write privileges than would Apple's Preview or Adobe Acrobat Reader. Adobe is in a position to keep the PDF specifications current in its products and Apple is not, leading to Preview treating some PDFs differently (or not at all). Some government documents are created with Adobe's LiveCycle Designer product on Windows, or some PDF formatter tool on Linux, and these drive Preview nuts because that Designer, or Linux product uses different forms (e.g. XFA) implementation than the traditional Acrobat Pro. The third-party ExifTool can reveal that data.


That said, I have PDFs from a labyrinth of creation software that Preview opens (mostly) without ever tampering with the permissions, or placing a lock on the PDF afterward. I have not experienced this in any macOS operating system over the last several years, though certainly aware that others have reported it. None of my PDFs reside on any cloud service and are local to my startup drive.


I know from past experience that the U.S. IRS provides downloadable PDFs with form fields that expect one to perform a Save As to write the filled contents to another PDF file, but not having a PDF editor, I have not experienced how they would behave if I opened and attempted to directly save them in Acrobat Pro or competing tool.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Preview Sets or Changes Owner Password Locking PDF Files Without Warning or Confirmation

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