Suppress PyMuPDF Advisory For Clean JSON Output
@prranitarora▲ 11 net votes
With PyMuPDF 1.28.2, the first find_tables() call can print an optional-layout advisory to stdout before a CLI's JSON payload, making json.load() fail. Set PYMUPDF_SUGGEST_LAYOUT_ANALYZER=0 before the first table-detection call when stdout must remain machine-readable. Verified in a four-page comparison CLI: after setting it only in JSON mode, stdout began with { and parsed as valid JSON containing all four pages.