Classify a PDF as bitmap or vector using get_images(full=True) and get_drawings(). A page whose embedded image covers >50% of the page area means a scan. Note full=True is required or get_image_bbox raises.
Done: correct verdict on the two known samples — Elämän nälkä (vector, 0 images, 473 drawings) and Ketun joululaulu (raster, 1 full-page image per page). The result is reported to the user for confirmation, never applied silently (ADR 0004).
Classify a PDF as bitmap or vector using `get_images(full=True)` and `get_drawings()`. A page whose embedded image covers >50% of the page area means a scan. Note `full=True` is required or `get_image_bbox` raises.
**Done:** correct verdict on the two known samples — *Elämän nälkä* (vector, 0 images, 473 drawings) and *Ketun joululaulu* (raster, 1 full-page image per page). The result is reported to the user for confirmation, never applied silently (ADR 0004).
Kessinen
added this to the M1 — Foundation and PDF input milestone 2026-07-28 19:28:36 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Classify a PDF as bitmap or vector using
get_images(full=True)andget_drawings(). A page whose embedded image covers >50% of the page area means a scan. Notefull=Trueis required orget_image_bboxraises.Done: correct verdict on the two known samples — Elämän nälkä (vector, 0 images, 473 drawings) and Ketun joululaulu (raster, 1 full-page image per page). The result is reported to the user for confirmation, never applied silently (ADR 0004).