pdf_check_access
Check a PDF's encryption and permissions to see whether it needs a password and what printing, copying, or editing actions are allowed.
Instructions
Check a PDF's encryption and what it permits: printing, copying, editing.
Answers "is this locked, and what am I allowed to do with it?".
encrypted and needs_password are separate answers and the difference
matters: most encrypted files have no user password, so they open silently and
only carry restrictions. permissions gives a boolean per action,
restrictions lists what is denied, and an unencrypted file permits
everything — a PDF has nowhere to keep restrictions but its encryption
dictionary.
Treat restrictions as what the file asks of viewers, not as enforcement: once a document is open nothing stops the bits being ignored, and a file that denies copying still yields its text to pdf_extract_text. Report them as the author's intent, never as an action being impossible.
Worth reaching for when another tool reports a file as encrypted; this one still answers, since the encryption dictionary is readable when the pages are not.
Args: ref: PDF file path, or a workspace artifact id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |