{"record":{"id":"557e9f91838bcb39","repo":"ocrmypdf/OCRmyPDF","slug":"jbig2-page-group-size-is-deprecated-and-will-be-ig","errorCode":null,"errorMessage":"jbig2_page_group_size is deprecated and will be ignored.","messagePattern":"jbig2_page_group_size is deprecated and will be ignored\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/ocrmypdf/api.py","lineNumber":843,"sourceCode":"        create_options_kwargs.update(kwargs)\n\n        parser = get_parser()\n        with _plugin_session(plugins, plugin_manager, parser=parser) as plugin_manager:\n            if 'verbose' in kwargs:\n                warn(\n                    \"ocrmypdf.ocr(verbose=) is ignored. \"\n                    \"Use ocrmypdf.configure_logging().\"\n                )\n\n            # Warn about deprecated jbig2 options and remove from kwargs\n            if jbig2_lossy:\n                warn(\n                    \"jbig2_lossy is deprecated and will be ignored. \"\n                    \"Lossy JBIG2 has been removed due to character substitution risks.\"\n                )\n                create_options_kwargs.pop('jbig2_lossy', None)\n            if jbig2_page_group_size:\n                warn(\"jbig2_page_group_size is deprecated and will be ignored.\")\n                create_options_kwargs.pop('jbig2_page_group_size', None)\n\n            options = create_options(\n                input_file=input_file,\n                output_file=output_file,\n                parser=parser,\n                **create_options_kwargs,\n            )\n            check_options(options, plugin_manager)\n            return run_pipeline(options=options, plugin_manager=plugin_manager)\n\n\ndef _pdf_to_hocr(  # noqa: D417\n    input_pdf: Path,\n    output_folder: Path,\n    *,\n    language: Iterable[str] | None = None,\n    image_dpi: int | None = None,","sourceCodeStart":825,"sourceCodeEnd":861,"githubUrl":"https://github.com/ocrmypdf/OCRmyPDF/blob/5074a0b0e109362422b768fd271ed84bf717c4ec/src/ocrmypdf/api.py#L825-L861","documentation":"The jbig2_page_group_size option is deprecated and ignored: JBIG2 page-group handling is no longer configurable. The argument is popped from kwargs after the warning.","triggerScenarios":"Calling ocrmypdf.ocr(..., jbig2_page_group_size=N).","commonSituations":"Tuned legacy scripts that grouped JBIG2 symbol dictionaries for size/robustness tradeoffs in older releases.","solutions":["Remove jbig2_page_group_size from your call","If you need that level of control, run the JBIG2 encoder (jbig2enc) manually in post-processing","Accept library defaults for JBIG2 grouping"],"exampleFix":"# before\nocrmypdf.ocr('in.pdf', 'out.pdf', jbig2_page_group_size=8)\n# after\nocrmypdf.ocr('in.pdf', 'out.pdf')","handlingStrategy":"validation","validationCode":"kwargs.pop('jbig2_page_group_size', None)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prune deprecated JBIG2 options during version upgrades","Don't carry legacy tuning dicts between releases"],"tags":["deprecation","jbig2","compression","removed-feature"],"backgroundTag":"deprecated-keyword-argument","analyzedSha":"5074a0b0e109362422b768fd271ed84bf717c4ec","analyzedAt":"2026-08-27T11:57:38.523Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}