Closed saper-2 closed 2 months ago
It's common practice to not document numerical values for these sort of constants, to encourage users to use the named constants instead of obscure numbers in their code.
The values can be found trivially with some Python:
import pymupdf
print(f'{pymupdf.PDF_OC_TOGGLE=}')
Initially, Ive been writing code in .net , and I used both net and python docs of MuPDF , so I noticed this. Since I was mainly using net I didn't even had a thought to 'search in pymupdf code' for those constant values. 🙃
But it'd be nice to update docs by this info.
Description of the bug
In doc there is no information what values have constant
PDF_OC_ON
,PDF_OC_TOGGLE
,PDF_OC_OFF
https://github.com/pymupdf/PyMuPDF/blob/a83732bddc288acece9755e6c3d7dff28adb2e9a/docs/document.rst?plain=1#L449
This also apply for other ports of MuPDF (e.g.: MuPDF.NET)
How to reproduce the bug
Missig doc information.
PyMuPDF version
1.24.7
Operating system
Other
Python version
3.12