Skip to content

Handle compressed, encrypted or inside-archive PDFs#335

Open
piater wants to merge 2 commits intovedang:masterfrom
piater:wrapped-pdf
Open

Handle compressed, encrypted or inside-archive PDFs#335
piater wants to merge 2 commits intovedang:masterfrom
piater:wrapped-pdf

Conversation

@piater
Copy link

@piater piater commented Dec 31, 2025

Review the changes carefully. While I did not observe any odd behavior, in pdf-view--write-contents-function I don't fully understand how it might happen that tempfile doesn't exist, why its deletion must be unwind-protected, whether and why pdf-info-close needs to be called, and why (in the original) pdf-view--server-file-name is reset.

Fixes #256
Fixes #257
Fixes #258

pdf-view-mode now identifies encrypted files by file name (perhaps not
ideal but this is how epa does it) and treats them as remote.

Fixes: vedang#256
pdf-view--write-contents-function no longer copies the local changes
directly to the destination file. Instead, it loads them into the
buffer and returns nil, causing the chain of write-contents-functions
to proceed. Thus, writing now is roughly the inverse of reading.

Fixes: vedang#257, vedang#258
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant