# OCR in Joplin (How to)

**URL:** <https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531>\
**Category:** Support\
**Created:** [7 April 2021 16:40 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531 "2021-04-07T16:40:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![myfta](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/myfta/32/8201_2.png) [@myfta](https://discourse.joplinapp.org/u/myfta)\
**Post date:** [7 April 2021 16:40 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/1 "2021-04-07T16:40:40Z")

</div>

Reviewing some of the discussions on this forum over the past 3 years or so there have been a couple of attempts to introduce OCR to Joplin. Now that I am seriously making use of the app I would like to have an OCR capability and would appreciate the current best way to implement this.

I have two scenarios.

1. New notes captured with Joplin's Webclipper that include an image that it would be good to extract any text from and post into the note.
2. Other notes either with an image or pdf attached that have been imported from Evernote that need to be processed and again the text added to the note.

Can the same solution cover both cases? Some of the discussions suggest that some previous ideas have been superseded.

A step by step installation for Windows would be helpful for the non-developer.

Thanks.

---

<div class="post-metadata">

**Author:** ![srm39](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@srm39](https://discourse.joplinapp.org/u/srm39)\
**Post date:** [9 April 2021 10:02 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/2 "2021-04-09T10:02:52Z")

</div>

+1 for this

---

<div class="post-metadata">

**Author:** ![myfta](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/myfta/32/8201_2.png) [@myfta](https://discourse.joplinapp.org/u/myfta)\
**Post date:** [12 April 2021 17:10 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/3 "2021-04-12T17:10:07Z")

</div>

Returning from a discussion here [OCR for existing Joplin notes](https://discourse.joplinapp.org/t/ocr-for-existing-joplin-notes/14866) here are my "instructions" for how to achieve this in Windows.

These instructions are for **Python 3.8** running in **Anaconda 1.10.0 in Windows**

At your Anaconda prompt install rest-uploader, ocr\_joplin\_notes and pytesseract

> pip install rest-uploader
> 
> pip install ocr\_joplin\_notes
> 
> pip install pytesseract

Install Tesseract from here as a regular Windows installation [Home · UB-Mannheim/tesseract Wiki · GitHub](https://github.com/UB-Mannheim/tesseract/wiki) as per the recommendation I used [tesseract-ocr-w64-setup-v5.0.0-alpha.20201127.exe](https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w64-setup-v5.0.0-alpha.20201127.exe)

Add User Variables in Windows - Settings - Advanced System Settings

Variable name TESSDATA\_PREFIX  
Variable value C:\Program Files\Tesseract-OCR\tessdata

In the System variables edit PATH to ADD

C:\Users\graha\Anaconda3\python.exe

and

C:\Program Files\Tesseract-OCR

Whilst there add your Joplin Token:

Variable name JOPLIN\_TOKEN  
Variable value "your Joplin Token from Joplin - Tools - Options - Web Clipper"

Check or add PYTHONPATH in System Variables

Variable name PYTHONPATH

Variable value C:\Users\<username\>\Anaconda3\python.exe

In my case, I am using Python3.8 in Anaconda, but this needs to point to your Python executable.

Now despite having Anaconda being up to date with the latest version there were some issues with the installed packages. In one case having two versions installed. The solution is to uninstall and reinstall the relevant packages again using pip uninstall/install at the Anaconda prompt.

I spotted these when trying to run the final instruction for ocr\_joplin\_notes the various packages would be mentioned in the error messages, so I fixed them one by one.

mkl-service was missing and needed to be installed, so here is the complete list:

> conda install -c conda-forge mkl-service
> 
> pip uninstall opencv-python
> 
> pip install opencv-python
> 
> pip uninstall numpy (first time to remove numpy-1.20.2)
> 
> pip uninstall numpy (second time to remove numpy-1.19.2
> 
> pip install numpy (installs a clean version of numpy-1.20.2)
> 
> pip uninstall pillow
> 
> pip install pillow

Now make sure Joplin is running. **Backup** all your notes to a JEX file **Joplin - File - Export All - JEX**

Then at a regular Windows Command prompt I can run:

> python -m ocr\_joplin\_notes.cli --mode=TAG\_NOTES

and it proceeds to tag all my notes with the scheme described in [GitHub - plamola/ocr-joplin-notes: Add OCR data from PDF and image files as a comment in Joplin, to enable full-text search](https://github.com/plamola/ocr-joplin-notes) under **Mode TAG\_NOTES**

---

<div class="post-metadata">

**Author:** ![myfta](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/myfta/32/8201_2.png) [@myfta](https://discourse.joplinapp.org/u/myfta)\
**Post date:** [24 October 2021 18:37 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/5 "2021-10-24T18:37:13Z")

</div>

[harun27](https://github.com/harun27) has now released an update to the original Python package [ocr-joplin-notes](https://github.com/harun27/ocr-joplin-notes) that enables the OCR of existing notes with both images and pdf attachments.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [24 October 2021 18:39 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/6 "2021-10-24T18:39:01Z")

</div>

Opened on 24 October 2021 18:39 UTC



---

<div class="post-metadata">

**Author:** ![bradwww](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@bradwww](https://discourse.joplinapp.org/u/bradwww)\
**Post date:** [13 January 2024 04:43 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/7 "2024-01-13T04:43:02Z")

</div>

please tell me how to turn on OCR function? i have installed today, checked the doc here: [Optical Character Recognition (OCR) | Joplin](https://joplinapp.org/help/apps/ocr)  
and still can't figure out where the switch is - help? thanks!

---

<div class="post-metadata">

**Author:** ![JackGruber](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/jackgruber/32/3231_2.png) [@JackGruber](https://discourse.joplinapp.org/u/JackGruber)\
**Post date:** [13 January 2024 08:16 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/8 "2024-01-13T08:16:56Z")

</div>

Go to the settings in a Joplin 2.14 version :

 ![grafik](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/f/a/fa80ecc18bb336e63ecf1992b7df4243c6364f76.png)

---

<div class="post-metadata">

**Author:** ![bradwww](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@bradwww](https://discourse.joplinapp.org/u/bradwww)\
**Post date:** [13 January 2024 22:25 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/9 "2024-01-13T22:25:33Z")

</div>

i downloaded the latest version, it is 2.13 ?? is this a beta or something? it was not mentioned in the docs. thanks.

---

<div class="post-metadata">

**Author:** ![JackGruber](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/jackgruber/32/3231_2.png) [@JackGruber](https://discourse.joplinapp.org/u/JackGruber)\
**Post date:** [13 January 2024 22:28 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/10 "2024-01-13T22:28:30Z")

</div>

Yes a preview version

---

<div class="post-metadata">

**Author:** ![PackElend](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/packelend/32/488_2.png) [@PackElend](https://discourse.joplinapp.org/u/PackElend)\
**Post date:** [24 February 2024 19:38 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/11 "2024-02-24T19:38:21Z")

</div>

@kish

> [@GSoC 2024 live blog](https://discourse.joplinapp.org/t/gsoc-2024-live-blog/36127/3):
>
> Please guide me about how to proceed with the OCR Plugin idea,

read this topic and read the updated [GSoC 2024 live blog](https://discourse.joplinapp.org/t/gsoc-2024-live-blog/36127)

---

<div class="post-metadata">

**Author:** ![kish](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kish/32/20356_2.png) [@kish](https://discourse.joplinapp.org/u/kish)\
**Post date:** [25 February 2024 04:38 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/12 "2024-02-25T04:38:25Z")

</div>

In the proposed idea mentioned in the ideas-2024.md, was it proposed in Node.js or javascript? Here they have performed OCR using python. And that's _complicated_ for an average person to achieve. This is achievable in JS.

---

<div class="post-metadata">

**Author:** ![kish](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kish/32/20356_2.png) [@kish](https://discourse.joplinapp.org/u/kish)\
**Post date:** [25 February 2024 07:37 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/13 "2024-02-25T07:37:26Z")

</div>

[OCR for existing Joplin Notes: Feb '21](https://discourse.joplinapp.org/t/ocr-for-existing-joplin-notes/14866/3)

Shall I start with proposing this idea in the features section?

---

<div class="post-metadata">

**Author:** ![PackElend](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/packelend/32/488_2.png) [@PackElend](https://discourse.joplinapp.org/u/PackElend)\
**Post date:** [25 February 2024 08:59 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/14 "2024-02-25T08:59:04Z")

</div>

> [@kish](#):
>
> Shall I start with proposing this idea in the features section?

why that? haven't you read yet:

> [@bradwww](#):
>
> please tell me how to turn on OCR function? i have installed today, checked the doc here: [Optical Character Recognition (OCR) | Joplin](https://joplinapp.org/help/apps/ocr)  
> and still can't figure out where the switch is - help? thanks!

---

<div class="post-metadata">

**Author:** ![kish](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kish/32/20356_2.png) [@kish](https://discourse.joplinapp.org/u/kish)\
**Post date:** [25 February 2024 09:13 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/15 "2024-02-25T09:13:03Z")

</div>

Oh yeah. Missed that, apologies. Thanks for taking your time

---

<div class="post-metadata">

**Author:** ![personalizedrefriger](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/personalizedrefriger/32/13210_2.png) [@personalizedrefriger](https://discourse.joplinapp.org/u/personalizedrefriger)\
**Post date:** [25 February 2024 14:39 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/16 "2024-02-25T14:39:19Z")

</div>

Here are some parts of the Joplin codebase that might be helpful to look at:

- [joplin/packages/lib/services/ocr at dev · laurent22/joplin · GitHub](https://github.com/laurent22/joplin/tree/dev/packages/lib/services/ocr)
- The [lines in NoteEditor.tsx](https://github.com/laurent22/joplin/blob/935f90422f39595709a33f9147cba607bc0de6b1/packages/app-desktop/gui/NoteEditor/NoteEditor.tsx#L584) responsible for showing resource search results.

---

<div class="post-metadata">

**Author:** ![Isaac](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@Isaac](https://discourse.joplinapp.org/u/Isaac)\
**Post date:** [5 March 2024 13:23 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/17 "2024-03-05T13:23:46Z")

</div>

Silly question... I've updated my joplin to 2.14.x and activated OCR.  
Does OCR now still only work for new notes?

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [5 March 2024 13:59 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/18 "2024-03-05T13:59:36Z")

</div>

No, it's going to process all your existing notes too

---

<div class="post-metadata">

**Author:** ![Isaac](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@Isaac](https://discourse.joplinapp.org/u/Isaac)\
**Post date:** [5 March 2024 14:36 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/19 "2024-03-05T14:36:23Z")

</div>

perfect - can I see the progress in the log or elsewhere?  
_(I have about 3k notes with attachements)_

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [5 March 2024 15:30 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/20 "2024-03-05T15:30:29Z")

</div>

Yes, if you open the console and filter on "ocr" [joplinapp.org/debugging](http://joplinapp.org/debugging)

---

<div class="post-metadata">

**Author:** ![Isaac](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@Isaac](https://discourse.joplinapp.org/u/Isaac)\
**Post date:** [5 March 2024 16:07 UTC](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531/21 "2024-03-05T16:07:09Z")

</div>

I'm getting this error in the log  
 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/e/2/e26749881d50e9c3d79461cafcb5ef08a79ff2eb.png)

[Next page](https://discourse.joplinapp.org/t/ocr-in-joplin-how-to/16531.md?page=2)
