mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-28 23:04:56 +00:00
Documentation: Add Password Removal workflow action documentation (#13377)
Addresses discussion #13373. Documents that password removal creates a new document version via re-consumption of the decrypted file rather than editing in place, and explains why the Consumption Started trigger produces an initial un-OCR'd version followed by a properly processed one.
This commit is contained in:
@@ -620,6 +620,34 @@ no other workflow will be executed on the document.
|
||||
If a "Move to Trash" action is executed in a consume pipeline, the consumption
|
||||
will be aborted and the file will be deleted.
|
||||
|
||||
##### Password Removal {#workflow-action-password-removal}
|
||||
|
||||
"Password Removal" actions attempt to remove password protection from encrypted PDF documents. You can specify:
|
||||
|
||||
- One or more passwords to try, separated by commas or new lines
|
||||
- Each password is tried in order until one successfully unlocks the document
|
||||
|
||||
Password removal never modifies a file in place. Instead, once a working password is found, the
|
||||
decrypted content is consumed as a new [document version](#document-file-versions), leaving the
|
||||
original (still encrypted) version in the document's version history.
|
||||
|
||||
**Consumption Started**: because this trigger fires before the document exists yet, the password
|
||||
removal itself is deferred until after the initial consumption of the encrypted file has completed.
|
||||
OCR engines cannot process an encrypted PDF, so this first version is typically stored with no
|
||||
extracted text (unless the file already contained extractable text outside of OCR). Immediately
|
||||
afterwards, the password is removed and the decrypted file is automatically re-consumed as a second,
|
||||
new version of the same document, this time with normal OCR/text extraction applied. In other words,
|
||||
a password-protected file added with this trigger will briefly exist as an un-OCR'd version before
|
||||
the properly processed version is created.
|
||||
|
||||
**Document Added**, **Document Updated**, **Scheduled**: these triggers run against a document that
|
||||
already exists, so password removal happens immediately: the decrypted content is queued for
|
||||
consumption as a new version right away. Note that if the document's initial consumption also
|
||||
happened while it was still encrypted, that original version will likewise be missing OCR text.
|
||||
|
||||
**Current limitation**: Passwords are stored as a simple list without descriptions. To handle
|
||||
multiple PDF types with different passwords, create separate workflows for each use case.
|
||||
|
||||
#### Workflow placeholders
|
||||
|
||||
Titles and webhook payloads can be generated by workflows using [Jinja templates](https://jinja.palletsprojects.com/en/3.1.x/templates/).
|
||||
|
||||
Reference in New Issue
Block a user