pdf-tools
pdf-tools copied to clipboard
Writing files read via jka-compr overwrites compressed file with uncompressed file
Steps to reproduce the behaviour
- Find any compressed PDF file, say,
compr.pdf.gz
. - Alter it, e.g. by adding annotations.
- Save it with C-x C-s.
This results in compr.pdf.gz
containing the altered PDF, not compressed despite the .gz
extension.
Writing to a new file with a .gz
extension using C-x -C-w likewise results in an uncompressed file.
What is the expected behaviour?
compr.pdf.gz
is replaced by its altered PDF, transparently gzip-compressed by jka-compr
.
Your pdf-tools install Status: Installed in ‘pdf-tools-20230611.239/’ (unsigned). Version: 20230611.239 Commit: c69e7656a4678fe25afbd29f3503dd19ee7f9896
This is perhaps best fixed jointly with #258 by changing the file-saving logic of pdf-tools.