OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched
This report presents the forensic synthetic code analysis of ocrmypdf/OCRmyPDF, a Python project with 34,176 GitHub stars. SynthScan v2.0 examined 47,359 lines of code across 227 source files, recording 766 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 19.2 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 766 distinct pattern matches across 16 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_multi_font_manager.py | 65 | def test_missing_font_directory(): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 75 | def test_select_font_for_arabic_language(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 83 | def test_select_font_for_persian_language(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 91 | def test_select_font_for_urdu_language(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 111 | def test_select_font_for_hindi_language(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 119 | def test_select_font_for_sanskrit_language(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 127 | def test_select_font_for_marathi_language(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 135 | def test_select_font_for_nepali_language(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 147 | def test_select_font_for_chinese_language(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 157 | def test_select_font_for_chinese_generic(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 167 | def test_select_font_for_chinese_simplified(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 177 | def test_select_font_for_chinese_traditional(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 187 | def test_select_font_for_japanese_language(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 197 | def test_select_font_for_korean_language(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 210 | def test_select_font_for_english_text(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 216 | def test_select_font_without_language_hint(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 225 | def test_select_font_arabic_text_without_language_hint(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 234 | def test_devanagari_text_without_language_hint(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 242 | def test_cjk_text_without_language_hint(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 252 | def test_fallback_to_occulta_font(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 260 | def test_fallback_fonts_constant(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 275 | def test_has_all_glyphs_for_english(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 281 | def test_has_all_glyphs_for_arabic(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 288 | def test_has_all_glyphs_for_devanagari(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 295 | def test_has_all_glyphs_for_cjk(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 302 | def test_empty_text_has_all_glyphs(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 307 | def test_has_all_glyphs_missing_font(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 315 | def test_font_selection_caching(multi_font_manager): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 537 | def test_cjk_falls_back_to_pan_cjk_super_font(): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 546 | def test_missing_cjk_font_warning_names_language_font(font_dir, caplog): | CODE |
| LOW⚡ | tests/test_multi_font_manager.py | 554 | def test_missing_font_warning_explains_consequences(font_dir, caplog): | CODE |
| LOW | tests/test_multi_font_manager.py | 53 | def test_init_loads_builtin_fonts(multi_font_manager): | CODE |
| LOW | tests/test_multi_font_manager.py | 329 | def test_language_font_map_coverage(): | CODE |
| LOW | tests/test_multi_font_manager.py | 376 | def test_custom_font_provider(font_dir): | CODE |
| LOW | tests/test_multi_font_manager.py | 392 | def test_missing_font_uses_fallback(font_dir): | CODE |
| LOW | tests/test_multi_font_manager.py | 407 | def test_builtin_font_provider_loads_expected_fonts(font_dir): | CODE |
| LOW | tests/test_multi_font_manager.py | 420 | def test_builtin_font_provider_get_font(font_dir): | CODE |
| LOW | tests/test_multi_font_manager.py | 432 | def test_builtin_font_provider_get_fallback(font_dir): | CODE |
| LOW | tests/test_multi_font_manager.py | 441 | def test_builtin_font_provider_missing_font_logs_warning(tmp_path, font_dir, caplog): | CODE |
| LOW | tests/test_multi_font_manager.py | 457 | def test_builtin_font_provider_missing_occulta_raises(tmp_path): | CODE |
| LOW | tests/test_multi_font_manager.py | 501 | def test_japanese_prefers_jp_family_over_other_cjk(): | CODE |
| LOW | tests/test_multi_font_manager.py | 513 | def test_chinese_simplified_prefers_sc_family(): | CODE |
| LOW | tests/test_multi_font_manager.py | 524 | def test_cjk_fails_over_when_preferred_subset_lacks_glyph(): | CODE |
| LOW | tests/test_ocr_engine_selection.py | 18 | def test_ocr_engine_option_exists(self): | CODE |
| LOW⚡ | tests/test_ocr_engine_selection.py | 30 | def test_ocr_engine_accepts_tesseract(self): | CODE |
| LOW⚡ | tests/test_ocr_engine_selection.py | 39 | def test_ocr_engine_accepts_auto(self): | CODE |
| LOW⚡ | tests/test_ocr_engine_selection.py | 48 | def test_ocr_engine_accepts_none(self): | CODE |
| LOW⚡ | tests/test_ocr_engine_selection.py | 57 | def test_ocr_engine_default_is_auto(self): | CODE |
| LOW⚡ | tests/test_ocr_engine_selection.py | 66 | def test_ocr_engine_rejects_invalid(self): | CODE |
| LOW | tests/test_ocr_engine_selection.py | 79 | def test_ocr_options_has_ocr_engine_field(self): | CODE |
| LOW | tests/test_ocr_engine_selection.py | 90 | def test_tesseract_selected_when_auto(self): | CODE |
| LOW | tests/test_ocr_engine_selection.py | 103 | def test_tesseract_selected_when_tesseract(self): | CODE |
| LOW | tests/test_ocr_engine_selection.py | 116 | def test_null_selected_when_none(self): | CODE |
| LOW | tests/test_ocr_engine_selection.py | 129 | def test_null_returns_none_when_auto(self): | CODE |
| LOW | tests/test_pipeline_generate_ocr.py | 22 | def test_ocr_engine_direct_function_exists(self): | CODE |
| LOW | tests/test_pipeline_generate_ocr.py | 28 | def test_ocr_engine_direct_returns_tuple(self, tmp_path): | CODE |
| LOW | tests/test_pipeline_generate_ocr.py | 54 | def test_page_result_has_ocr_tree_field(self): | CODE |
| LOW | tests/test_pipeline_generate_ocr.py | 61 | def test_page_result_ocr_tree_default_none(self): | CODE |
| LOW | tests/test_pipeline_generate_ocr.py | 89 | def test_hocr_result_has_ocr_tree_field(self): | CODE |
| LOW | tests/test_pipeline_generate_ocr.py | 96 | def test_hocr_result_ocr_tree_default_none(self): | CODE |
| 332 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | misc/synology.py | 7 | CODE | |
| LOW | misc/pdf_text_diff.py | 6 | CODE | |
| LOW | misc/batch.py | 15 | CODE | |
| LOW | misc/example_plugin.py | 22 | CODE | |
| LOW | misc/webservice.py | 7 | CODE | |
| LOW | misc/webservice.py | 13 | CODE | |
| LOW | misc/pdf_compare.py | 6 | CODE | |
| LOW | misc/watcher.py | 8 | CODE | |
| LOW | misc/bisect_pdf.py | 6 | CODE | |
| LOW | misc/_webservice.py | 13 | CODE | |
| LOW | misc/ocrmypdf_compare.py | 6 | CODE | |
| LOW | bin/bump_version.py | 7 | CODE | |
| LOW | tests/test_multi_font_manager.py | 6 | CODE | |
| LOW | tests/test_ocr_engine_selection.py | 10 | CODE | |
| LOW | tests/test_pipeline_generate_ocr.py | 10 | CODE | |
| LOW | tests/test_system_font_provider.py | 6 | CODE | |
| LOW | tests/test_concurrency.py | 4 | CODE | |
| LOW | tests/conftest.py | 4 | CODE | |
| LOW | tests/test_rasterizer.py | 6 | CODE | |
| LOW | tests/test_rasterizer.py | 25 | CODE | |
| LOW | tests/test_validation.py | 4 | CODE | |
| LOW | tests/test_logging.py | 4 | CODE | |
| LOW | tests/test_hocr_parser.py | 6 | CODE | |
| LOW | tests/test_thumbnails.py | 4 | CODE | |
| LOW | tests/test_check_pdf.py | 4 | CODE | |
| LOW | tests/test_null_ocr_engine.py | 10 | CODE | |
| LOW | tests/test_tagged.py | 4 | CODE | |
| LOW | tests/test_optimize.py | 4 | CODE | |
| LOW | tests/test_strip.py | 6 | CODE | |
| LOW | tests/test_stdio.py | 4 | CODE | |
| LOW | tests/test_image_input.py | 4 | CODE | |
| LOW | tests/test_metadata.py | 4 | CODE | |
| LOW | tests/__init__.py | 6 | CODE | |
| LOW | tests/test_pdf_renderer.py | 6 | CODE | |
| LOW | tests/test_semfree.py | 4 | CODE | |
| LOW | tests/test_preprocessing.py | 4 | CODE | |
| LOW | tests/test_rotation.py | 4 | CODE | |
| LOW | tests/test_ocr_element.py | 6 | CODE | |
| LOW | tests/test_page_boxes.py | 4 | CODE | |
| LOW | tests/test_search_index.py | 4 | CODE | |
| LOW | tests/test_ocr_engine_interface.py | 10 | CODE | |
| LOW | tests/test_pdfinfo.py | 4 | CODE | |
| LOW | tests/test_json_serialization.py | 2 | CODE | |
| LOW | tests/test_acroform.py | 4 | CODE | |
| LOW | tests/test_hocrtransform.py | 4 | CODE | |
| LOW | tests/test_userunit.py | 4 | CODE | |
| LOW | tests/test_ghostscript.py | 4 | CODE | |
| LOW | tests/test_multilingual_direct.py | 13 | CODE | |
| LOW | tests/test_unpaper.py | 4 | CODE | |
| LOW | tests/test_annots.py | 4 | CODE | |
| LOW | tests/test_tesseract.py | 4 | CODE | |
| LOW | tests/test_imageops.py | 4 | CODE | |
| LOW | tests/test_page_numbers.py | 4 | CODE | |
| LOW | tests/test_helpers.py | 4 | CODE | |
| LOW | tests/test_verapdf.py | 6 | CODE | |
| LOW | tests/test_api.py | 4 | CODE | |
| LOW | tests/test_graft.py | 4 | CODE | |
| LOW | tests/test_pdfa.py | 4 | CODE | |
| LOW | tests/test_watcher.py | 1 | CODE | |
| LOW | tests/test_main.py | 4 | CODE | |
| 161 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_rasterizer.py | 343 | # Create an image with gradients to detect rasterization errors | COMMENT |
| MEDIUM | tests/test_rasterizer.py | 377 | # Create an image with gradients to detect rasterization errors | COMMENT |
| MEDIUM⚡ | tests/test_ocr_engine_interface.py | 35 | # Create a minimal concrete implementation | COMMENT |
| MEDIUM | tests/test_pdfinfo.py | 142 | # Create an RGB image and save as JPEG | COMMENT |
| MEDIUM | tests/test_pdfinfo.py | 151 | # Create a PDF with the flate+jpeg image | COMMENT |
| MEDIUM | tests/test_ghostscript.py | 560 | # Create an invalid image object that has both ColorSpace and ImageMask set | COMMENT |
| MEDIUM⚡ | tests/test_annots.py | 19 | # Create a broken named destination | COMMENT |
| MEDIUM⚡ | tests/test_annots.py | 21 | # Create a valid named destination | COMMENT |
| MEDIUM | tests/test_graft.py | 53 | # Create a PDF with a non-zero mediabox origin | COMMENT |
| MEDIUM | tests/test_fpdf_renderer.py | 107 | # Create a non-page element | COMMENT |
| MEDIUM | tests/test_fpdf_renderer.py | 138 | # Create a simple page with one word | COMMENT |
| MEDIUM | tests/test_fpdf_renderer.py | 412 | # Create a page with multiple words on one line | COMMENT |
| MEDIUM | tests/test_fpdf_renderer.py | 480 | # Create a page with CJK words (Chinese characters) | COMMENT |
| MEDIUM | docs/conf.py | 10 | # This file is execfile()d with the current directory set to its | COMMENT |
| MEDIUM | src/ocrmypdf/_options.py | 488 | # Create a copy of the model data for serialization | COMMENT |
| MEDIUM | src/ocrmypdf/_pipeline.py | 833 | # Create a new single page PDF to hold | COMMENT |
| MEDIUM | src/ocrmypdf/_annots.py | 41 | # Create a set of all named destinations | COMMENT |
| MEDIUM | src/ocrmypdf/fpdf_renderer/renderer.py | 948 | # Create a renderer for this page | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_multilingual_direct.py | 69 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_multilingual_direct.py | 71 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_multilingual_direct.py | 537 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_multilingual_direct.py | 539 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_multilingual_direct.py | 141 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_multilingual_direct.py | 143 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_multilingual_direct.py | 216 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_multilingual_direct.py | 218 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_multilingual_direct.py | 314 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_multilingual_direct.py | 316 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_multilingual_direct.py | 381 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_multilingual_direct.py | 383 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_multilingual_direct.py | 511 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_multilingual_direct.py | 513 | # ============================================================================= | COMMENT |
| MEDIUM | src/ocrmypdf/_plugin_manager.py | 113 | # ========================================================================= | COMMENT |
| MEDIUM | src/ocrmypdf/_plugin_manager.py | 115 | # ========================================================================= | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | misc/pdf_compare.py | 34 | CODE | |
| LOW | misc/ocrmypdf_compare.py | 50 | CODE | |
| LOW | bin/bump_version.py | 102 | CODE | |
| LOW | tests/test_pdf_renderer.py | 690 | CODE | |
| LOW | tests/test_ghostscript.py | 625 | CODE | |
| LOW | tests/test_ghostscript.py | 659 | CODE | |
| LOW | tests/test_ghostscript.py | 628 | CODE | |
| LOW | tests/plugins/tesseract_cache.py | 66 | CODE | |
| LOW | tests/plugins/tesseract_cache.py | 67 | CODE | |
| LOW | src/ocrmypdf/optimize.py | 142 | CODE | |
| LOW | src/ocrmypdf/optimize.py | 202 | CODE | |
| LOW | src/ocrmypdf/_options.py | 92 | CODE | |
| LOW | src/ocrmypdf/_options.py | 486 | CODE | |
| LOW | src/ocrmypdf/_options.py | 588 | CODE | |
| LOW | src/ocrmypdf/_options.py | 492 | CODE | |
| LOW | src/ocrmypdf/_graft.py | 177 | CODE | |
| LOW | src/ocrmypdf/_graft.py | 613 | CODE | |
| LOW | src/ocrmypdf/api.py | 318 | CODE | |
| LOW | src/ocrmypdf/imageops.py | 29 | CODE | |
| LOW | src/ocrmypdf/_pipeline.py | 73 | CODE | |
| LOW | src/ocrmypdf/_pipeline.py | 170 | CODE | |
| LOW | src/ocrmypdf/_pipeline.py | 337 | CODE | |
| LOW | src/ocrmypdf/_pipeline.py | 530 | CODE | |
| LOW | src/ocrmypdf/_pipeline.py | 1325 | CODE | |
| LOW | src/ocrmypdf/_validation.py | 188 | CODE | |
| LOW | src/ocrmypdf/pdfa.py | 151 | CODE | |
| LOW | src/ocrmypdf/pdfa.py | 174 | CODE | |
| LOW | src/ocrmypdf/helpers.py | 252 | CODE | |
| LOW | src/ocrmypdf/pdfinfo/layout.py | 287 | CODE | |
| LOW | src/ocrmypdf/pdfinfo/_contentstream.py | 137 | CODE | |
| LOW | src/ocrmypdf/pdfinfo/info.py | 140 | CODE | |
| LOW | src/ocrmypdf/builtin_plugins/pypdfium.py | 122 | CODE | |
| LOW | src/ocrmypdf/builtin_plugins/ghostscript.py | 276 | CODE | |
| LOW | src/ocrmypdf/builtin_plugins/ghostscript.py | 341 | CODE | |
| LOW | src/ocrmypdf/builtin_plugins/ghostscript.py | 297 | CODE | |
| LOW | src/ocrmypdf/subprocess/_windows.py | 90 | CODE | |
| LOW | src/ocrmypdf/subprocess/_run.py | 79 | CODE | |
| LOW | src/ocrmypdf/_pipelines/_common.py | 514 | CODE | |
| LOW | src/ocrmypdf/extra_plugins/semfree.py | 120 | CODE | |
| LOW | src/ocrmypdf/_exec/tesseract.py | 281 | CODE | |
| LOW | src/ocrmypdf/_exec/ghostscript.py | 107 | CODE | |
| LOW | src/ocrmypdf/font/system_font_provider.py | 254 | CODE | |
| LOW | src/ocrmypdf/font/system_font_provider.py | 316 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/ocrmypdf/api.py | 77 | Set up plugin infrastructure with proper initialization. This function handles: 1. Creating or validating the p | STRING |
| HIGH | src/ocrmypdf/api.py | 349 | Construct an options object from the input/output files and keyword arguments. Args: input_file: Input file | STRING |
| HIGH | src/ocrmypdf/api.py | 545 | Run OCRmyPDF on one PDF or image. This function supports two calling conventions: **New style (recommended):** | STRING |
| HIGH | src/ocrmypdf/pdfa.py | 280 | Attempt to convert a PDF to PDF/A by adding required structures. This function creates a copy of the input PDF and | STRING |
| HIGH | src/ocrmypdf/builtin_plugins/tesseract_ocr.py | 30 | Convert string argument to ThresholdingMethod enum. Args: value: String name of thresholding method (auto, | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | misc/batch.py | 86 | except Exception: | CODE |
| LOW | tests/conftest.py | 51 | except Exception: # pylint: disable=broad-except | CODE |
| MEDIUM | tests/conftest.py | 48 | def have_unpaper(): | CODE |
| LOW | tests/test_metadata.py | 243 | except Exception: # pylint: disable=broad-except | CODE |
| MEDIUM | tests/test_metadata.py | 231 | def libxmp_file_to_dict(): | CODE |
| LOW | src/ocrmypdf/optimize.py | 356 | except Exception: # pylint: disable=broad-except | CODE |
| LOW | src/ocrmypdf/api.py | 405 | except Exception as e: | CODE |
| LOW | src/ocrmypdf/api.py | 869 | except Exception as e: | CODE |
| LOW | src/ocrmypdf/api.py | 985 | except Exception as e: | CODE |
| LOW | src/ocrmypdf/_pipeline.py | 1078 | except Exception as e: | CODE |
| LOW | src/ocrmypdf/builtin_plugins/concurrency.py | 56 | except Exception: # pylint: disable=broad-except | CODE |
| LOW | src/ocrmypdf/builtin_plugins/concurrency.py | 171 | except Exception: | CODE |
| LOW | src/ocrmypdf/_pipelines/_common.py | 317 | except Exception: # pylint: disable=broad-except | CODE |
| LOW | src/ocrmypdf/extra_plugins/semfree.py | 106 | except Exception as e: # pylint: disable=broad-except | CODE |
| LOW | src/ocrmypdf/font/font_provider.py | 99 | except Exception as e: | CODE |
| LOW | src/ocrmypdf/font/system_font_provider.py | 385 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_rasterizer.py | 23 | # Check if pypdfium2 is available | COMMENT |
| LOW | tests/plugins/tesseract_cache.py | 101 | # Check if cache has all required files | COMMENT |
| LOW | src/ocrmypdf/_options.py | 676 | # Check if this is a plugin namespace | COMMENT |
| LOW | src/ocrmypdf/_annots.py | 30 | # Check if there are any named destinations | COMMENT |
| LOW | src/ocrmypdf/pdfa.py | 266 | # Check if sRGB OutputIntent already exists | COMMENT |
| LOW | src/ocrmypdf/fpdf_renderer/renderer.py | 820 | # Check if character is in CJK ranges | COMMENT |
| LOW | src/ocrmypdf/builtin_plugins/pypdfium.py | 251 | # Check if user explicitly requested a different rasterizer | COMMENT |
| LOW | src/ocrmypdf/builtin_plugins/ghostscript.py | 254 | # Check if user explicitly requested a different rasterizer | COMMENT |
| LOW | src/ocrmypdf/builtin_plugins/ghostscript.py | 308 | # Check if it's an image with DCTDecode | COMMENT |
| LOW | src/ocrmypdf/builtin_plugins/ghostscript.py | 376 | # Check if output is 1-15 bytes shorter | COMMENT |
| LOW | src/ocrmypdf/builtin_plugins/ghostscript.py | 381 | # Check if the bytes are identical up to the truncation point | COMMENT |
| LOW | src/ocrmypdf/font/multi_font_manager.py | 261 | # Check if text contains non-ASCII characters | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/conf.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | docs/conf.py | 121 | # non-false value, then it is used: | COMMENT |
| LOW | docs/conf.py | 141 | # add_function_parentheses = True | COMMENT |
| LOW | docs/conf.py | 181 | # ReadTheDocs used to inject the "Edit on GitHub" context automatically, but | COMMENT |
| LOW | docs/conf.py | 201 | # html_title = 'ocrmypdf v4.2' | COMMENT |
| LOW | docs/conf.py | 221 | # html_static_path = ['_static'] | COMMENT |
| LOW | docs/conf.py | 241 | # | COMMENT |
| LOW | docs/conf.py | 261 | # If true, links to the reST sources are added to the pages. | COMMENT |
| LOW | docs/conf.py | 281 | COMMENT | |
| LOW | docs/conf.py | 301 | htmlhelp_basename = 'ocrmypdfdoc' | COMMENT |
| LOW | docs/conf.py | 321 | # (source start file, target name, title, | COMMENT |
| LOW | docs/conf.py | 341 | # If true, show URL addresses after external links. | COMMENT |
| LOW | docs/conf.py | 401 | # | COMMENT |
| LOW | src/ocrmypdf/_jobcontext.py | 121 | # Otherwise, we have a fallback Namespace (shouldn't happen in normal operation) | COMMENT |
| LOW | src/ocrmypdf/_exec/ghostscript.py | 341 | COMMENT | |
| LOW | src/ocrmypdf/_exec/ghostscript.py | 421 | # Occasionally the error message is spammed many times. We filter | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/ocrmypdf/_pipelines/hocr_to_ocr_pdf.py | 0 | implements the concurrent and page synchronous parts of the pipeline. | STRING |
| HIGH | src/ocrmypdf/_pipelines/ocr.py | 0 | implements the concurrent and page synchronous parts of the pipeline. | STRING |
| HIGH | src/ocrmypdf/_pipelines/pdf_to_hocr.py | 0 | implements the concurrent and page synchronous parts of the pipeline. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_fpdf_renderer.py | 326 | """Test rendering comprehensive multilingual 'Hello!' hOCR file. | STRING |
| MEDIUM⚡ | src/ocrmypdf/_validation_coordinator.py | 28 | """Run comprehensive validation on all options. | STRING |
| MEDIUM | src/ocrmypdf/_validation.py | 168 | # Finally, run comprehensive validation using the coordinator | COMMENT |
| MEDIUM | src/ocrmypdf/_stdoutprotect.py | 55 | # a test harness or replaced with an in-memory stream). | COMMENT |
| LOW | src/ocrmypdf/_exec/unpaper.py | 62 | # No changes, PNG input, just use the file we already have | COMMENT |
| LOW | src/ocrmypdf/_exec/unpaper.py | 65 | # adds a few seconds to test suite - so just use pnm | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/ocrmypdf/__init__.py | 50 | __all__ = [ | CODE |
| LOW | src/ocrmypdf/api.py | 995 | __all__ = [ | CODE |
| LOW | src/ocrmypdf/_plugin_manager.py | 284 | __all__ = ['OcrmypdfPluginManager', 'get_plugin_manager'] | CODE |
| LOW | src/ocrmypdf/fpdf_renderer/__init__.py | 17 | __all__ = [ | CODE |
| LOW | src/ocrmypdf/pdfinfo/__init__.py | 12 | __all__ = ["Colorspace", "Encoding", "FloatRect", "Ink", "PageInfo", "PdfInfo"] | CODE |
| LOW | src/ocrmypdf/subprocess/__init__.py | 24 | __all__ = [ | CODE |
| LOW | src/ocrmypdf/font/__init__.py | 24 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | misc/watcher.py | 159 | CODE | |
| LOW | src/ocrmypdf/api.py | 421 | CODE | |
| LOW | src/ocrmypdf/api.py | 484 | CODE | |
| LOW | src/ocrmypdf/api.py | 738 | CODE | |
| LOW | src/ocrmypdf/api.py | 877 | CODE | |
| LOW | src/ocrmypdf/__main__.py | 81 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_api.py | 150 | '"textpdf": {"Path": "c"}, "orientation_correction": 180, "ocr_tree": null}' | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/ocrmypdf/_validation_coordinator.py | 38 | # Step 1: Plugin context validation | COMMENT |
| LOW⚡ | src/ocrmypdf/_validation_coordinator.py | 41 | # Step 2: Cross-cutting validation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/ocrmypdf/_validation_coordinator.py | 38 | # Step 1: Plugin context validation | COMMENT |
| LOW⚡ | src/ocrmypdf/_validation_coordinator.py | 41 | # Step 2: Cross-cutting validation | COMMENT |