Are you saving to a local hard drive, external drive or network?
I'd also check the properties of the file to make sure it is not read only (check in File Explorer - right click on the file and go to Properties).
If you don't have the file
open in another application it could be that somebody else on the same network has it open? Or it could be a file permissions issue? Have you checked the File permissions?
An extremely annoying bug, has nothing to do with another application, the error appears out of nowhere, can't believe in 2017 photoshop has such serious bugs.
Anyway I've solved it by closing all my open pictures and turning all my open directories into thumbnails, I believe the pictures that are open on windows are the problem, why it has to do with photoshop? no clue.
I use windows 10 with photoshop cc 2017
When you save the file to a pdf, do you have an existing pdf that you are saving over? If so, that could be your issue. If the file is open when saving to a pdf, it can't write over the existing file and you will get an error. Make sure the files are closed, and let us know if you are still having issues.
same issue, I have Adobe Pro and trying to add comments but keeps on throwing me out. It's on my own personal network so no one else is using it...