getSigFlags incorrect return (int conversion) (original) (raw)
Describe the bug (mandatory)
When using p.getSigFlags() (with a PDF file), it returns 4294967295 on versions ('1.17.3', '1.17.0', '20200706150704') and ('1.17.4', '1.17.0', '20200720180940'). The same call returns 0 on version ('1.16.17', '1.16.0', '20200331085333'). None of these is among the possible values of -1, 1 or 3, but the latest version is, in fact, a -1 represented as an uint32, so I suspect a conversion problem.
To Reproduce (mandatory)
import fitz f = open('../sample_data/test.pdf', 'rb').read() p = fitz.open(stream=f, filetype='pdf') p.getSigFlags() 4294967295 fitz.version ('1.17.4', '1.17.0', '20200720180940')
Your configuration (mandatory)
- MacOS 10.15.4
- Python 3.7.0 | packaged by conda-forge | (default, Nov 12 2018, 12:34:36) \n[Clang 4.0.1 (tags/RELEASE_401/final)]
- PyMuPDF version: see above. Installed via
pip install
Let me know if you need the test file.