You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening a gpg-encrypted PDF, epa - the EasyPG Assistant - transparently decrypts it and loads it into a buffer named by the original, encrypted file. Consequently, epdfinfo expects to find a PDF file by this name and fails.
A quick fix is to handle encrypted files like compressed and remote files and store a decrypted copy in the current buffer’s dedicated temp directory. This is achieved by adding a simple, four-line condition to pdf-view-mode in pdf-view.el, replacing
The condition may not be the best one, but I have not found a way to directly test whether the (decrypted) contents of a given buffer were loaded from an encrypted file.
Storing an unencrypted copy (even inside a 700 directory) poses certain privacy risks, so this quick fix is not universally applicable. Perhaps this behavior should be customizable, defaulting to off.
This implements reading only. I haven't looked into writing altered PDF back to their encrypted files. Stay tuned.
The text was updated successfully, but these errors were encountered:
Currently, saving a PDF read from an encrypted PDF file overwrites the encrypted file with the clear-text PDF, despite the .gpg extension. The mechanism is probably the same as Writing files read via jka-compr overwrites compressed file with uncompressed file #257. Thus, either that issue should be fixed first, or reading gpg-encrypted files should only be enabled together with a stop-gap measure to disable writing such files.
When opening a gpg-encrypted PDF, epa - the EasyPG Assistant - transparently decrypts it and loads it into a buffer named by the original, encrypted file. Consequently, epdfinfo expects to find a PDF file by this name and fails.
A quick fix is to handle encrypted files like compressed and remote files and store a decrypted copy in the current buffer’s dedicated temp directory. This is achieved by adding a simple, four-line condition to
pdf-view-mode
in pdf-view.el, replacingby
Caveats:
The text was updated successfully, but these errors were encountered: