Skip to content

v17.15.1

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Dec 05:42
208b919

Fixes

  • Fixed RapidOCR reading a narrow table column of short cells, such as
    "1", "2" and "<5", as vertical text. Its detector merged several rows of
    such a column into one tall box, which RapidOCR read as one rotated line,
    one character per row and often the wrong one: a column of "<5" came out
    as "00000", and cells of two digits lost one. Such a box is now split into
    its rows, and each cell is read again as upright text on its row. Text
    that is really vertical or rotated is read as before.
  • Fixed RapidOCR losing most cells of a narrow table column whose tall box
    it could not read at all. RapidOCR drops a box that reads as nothing, or
    scores under its text score, before OCRmyPDF sees it; on a scanned table
    of "<1" values, it dropped most of the column. OCRmyPDF now also examines
    the tall boxes RapidOCR drops, and those it reads as a single character,
    and splits those that lie over table rows like any other. Of such a box,
    only the cells that read credibly upright are kept. A dropped box that
    does not lie over table rows stays dropped.
  • Fixed the pypdfium rasterizer breaking thin strokes on 1-bit scanned pages,
    which cost OCR many characters on typewritten and faxed tables. It smoothed
    the page's 1-bit image while resampling it, then dithered the gray back to
    1-bit, scattering one-pixel strokes into dots. OCRmyPDF chooses a 1-bit
    raster only for pages whose images are all 1-bit, so there is no real gray
    to keep: the rasterizer now samples such images without smoothing and
    thresholds instead of dithering. A page that one scanned image fills, and
    whose resolution differs slightly between x and y, is now rendered on the
    scan's own pixel grid, so the OCR engine reads the scan's own pixels; when
    the page image is rebuilt, as with --force-ocr or --deskew, it starts
    from those pixels too. Grayscale and color pages, and the Ghostscript
    rasterizer, are unchanged.