Lines in a scanned document turn upside down

scan document on iPhone…
everything OK but the recognized lines are always from bottom to top, last becoming first…
any of you?
thanks

You are using the “Scan Document” option in Drafts’ “+” menu to OCR a document?

Not something I’ve seen. You can reproduce this with multiple different documents?

yes, almost every multi lined document

Working fine for me right now.

  1. If you scan & OCR in another app (e.g. Apple Notes) do you get the same result?
  2. Does the behaviour persist if you reboot your phone?

i’ll try and be back to you…

No problem in Apple Notes.
The problem arises when I take an horizontal scan, and then I crop image to recognize only a part

Ah okay I think those details might be quite useful in reproducing the issue.

I just rotated my phone, took a horizontal snapshot of a solicitor’s letter I have to hand, and then I cropped it to just the solicitor’s details at the bottom of the letterhead-ed paper. That section looks like this:

After scanning Drafts produced this:

Registered Office: 127 Ramsden Square, Banow in fumess, Cumbria LA 14 1XA
Also at 31 Lapstone Road Millom Cumbria LA 18 4BT - (by appointment)
127 Ramsden Square, Barrow-in-Fumess, Cumbria LA14 1XA
This firm is authorised and regulated by the Counci for Licensed Conveyancers. ID No. 11853
A list of Directors is available at the Registered office Service of proceedings not accepted by e-mail or fax.
Tel: 01229 820021 Fax: 01229 811212 Email: info@brownandmurray.co.uk
Brown & Murray Legal Services is the trading name of Brown & Munay Legal Services Ltd. Company Registration No. 5341311.

 
So that gave me things out of order, but not the reverse order you said that you got. That gave me the 7 lines in the following order:

LINES: 3-7-1-5-6-2-4

Rather interestingly, that seems to correspond to the relative length of the lines on the page (they vary by font so it isn’t characters), with line 3 being the shortest, and the lines getting progressively longer until the longest line, number 4, at the end.

If I retake the snapshot in portrait, cropping to that section, the result is all of the lines in order.

If I retake the snapshot in landscape and do not bother with any cropping, I get a reordering of content as before.

This strongly suggests that the issue is when the image is taken in landscape. Maybe it is mis-using the orientation data?

Based on my tests, the workaround for now would be to do your scanning in portrait and not landscape.

I’ll take a look, I think I know what’s happening and I’d definitely consider it a bug.