EQAR / eqar_backend

REST API backend for the DEQAR database.
GNU General Public License v3.0
1 stars 0 forks source link

PyPDF needs update #510

Closed ctueck closed 4 months ago

ctueck commented 6 months ago

EQAR colleagues noted a case where a PDF file was rejected when uploaded:

colin@CT-MBA:~/Downloads$ file 04_IEP_*
04_IEP_ERR.pdf:                    PDF document, version 1.5
04_IEP_external_review_report.pdf: PDF document, version 1.7 (zip deflate encoded)

First one works, second doesn't. This seems to be an issue with the PyPDF library, maybe it doesn't handle PDF version 1.7 well? It's used to validate in:

https://github.com/EQAR/eqar_backend/blob/bf603894ba33fa5a322d24cbb38e1d62bb6d7953/adminapi/fields.py#L8

The version we use seems to be ~2 years old, and also they changed the PyPi repo & package name from https://pypi.org/project/PyPDF2/ to https://pypi.org/project/pypdf/ in the meantime.