If you cannot read it without providing a password, then it's encrypted. (That said, earlier Office and Acrobat versions used to have really weak algorithms. Modern versions tend to use AES.)
If you can read it without a password, but must provide a password to modify, then the file is merely locked. Depending on the format, it might be enough to just flip a bit with a hex editor, or to modify the reader itself; e.g. Evince has a setting to ignore PDF restrictions. (But see below↓.)
- (There is a slight possibility that the password was used for authentication/integrity checks as well, using some hash, though I can't remember any scheme that would allow verification without knowing the password, so that's probably unlikely.)
But, don't forget that the author might have simply embedded an image of the text, instead of text itself. Maybe the PDF came out of a scanner. Maybe it's not a PDF but a PostScript .ps
document, which is somewhere halfway between text & image.
↓This bit, however...
I imagine if it was encrypted, it shouldn't be selectable, but should be blended into the page, like an image.
...is partly nonsense, but partly an interesting idea.
On the one hand, encryption doesn't change the way data works. If you encrypt a text document (e.g. a PDF file), then decrypt it, you get the exact same bytes back – you get the original document, not a flat image of it.
That said, it could work this way – the document could easily have two versions embedded in it; a rendered image readable by anyone, and an encrypted original readable (and therefore modifiable) only with a password. To modify the document, you would need to decrypt the original, edit it, and render into the image again.
I know Office documents don't do this – the modification password is just a lock. I'm less sure about PDF.
But I also doubt it, since this double-document scheme does have a major loophole: someone could still photoshop the image directly, and since the original is encrypted, this would be impossible to detect.