the-paperless-project / paperless

Scan, index, and archive all of your paper documents
GNU General Public License v3.0
7.85k stars 499 forks source link

PNM files ignored #452

Open danadux opened 5 years ago

danadux commented 5 years ago

Issue is in the title. Consumer will read PDFs and PNGs but is ignoring the default file "PNM" that my Brother scanner is creating in Ubuntu. The files aren't corrupted, and there isn't any message in the log about the file.

danadux commented 5 years ago

I tried editing the signals.py server side file to move PNM to the front of the recognized files, in case there was something wonky with the syntax. No joy there. Any ideas on how to get it to fire an alert on why it is ignoring the file?

syntonym commented 5 years ago

I think signals.py is the wrong file to look at, the regex that controls which files are detected should be this one. I just tried to add pnm to the regex and it seemed to work fine.

syntonym commented 5 years ago

It fails then when trying to download the original, I guess one needs to properly add it to documents.models.Document if you want to support PNM as source files. I think there should also be the possibility to transform the PNM file to a pdf file via a paperless hook.