diff --git a/File-Formats/PDF/Working-with-OCR/OCR-Images/Install-leptonica.png b/File-Formats/PDF/Working-with-OCR/OCR-Images/Install-leptonica.png new file mode 100644 index 000000000..9c6906076 Binary files /dev/null and b/File-Formats/PDF/Working-with-OCR/OCR-Images/Install-leptonica.png differ diff --git a/File-Formats/PDF/Working-with-OCR/OCR-Images/Install-tesseract.png b/File-Formats/PDF/Working-with-OCR/OCR-Images/Install-tesseract.png new file mode 100644 index 000000000..9e659837e Binary files /dev/null and b/File-Formats/PDF/Working-with-OCR/OCR-Images/Install-tesseract.png differ diff --git a/File-Formats/PDF/Working-with-OCR/Troubleshooting.md b/File-Formats/PDF/Working-with-OCR/Troubleshooting.md index 90f0e1e30..755c9ab22 100644 --- a/File-Formats/PDF/Working-with-OCR/Troubleshooting.md +++ b/File-Formats/PDF/Working-with-OCR/Troubleshooting.md @@ -235,3 +235,57 @@ using (OCRProcessor processor = new OCRProcessor("/opt/homebrew/Cellar/tesseract + +## Method PerformOCR() causes problems and ignores the tesseract files under WSL. + +
| Issue | +Method PerformOCR() causes problem and ignores the tesseract files under WSL | +
|---|---|
| Reason + | +Tesseract binaries in WSL are missing. + | +
| Solution | +To resolve this problem, you should install and utilize Leptonica and Tesseract on your machine. Refer to the following steps for installing Leptonica and Tesseract,
+ +1. Install the leptonica. + +{% highlight c# tabtitle="C#" %} + +sudo apt-get install libleptonica-dev + +{% endhighlight %} + +
++2.Install the tesseract. + + +{% highlight c# tabtitle="C#" %} + +sudo apt-get install tesseract-ocr-eng + +{% endhighlight %} + +
++3. Copy the binaries (liblept.so and libtesseract.so) to the missing files exception folder in the project location. + +{% highlight c# tabtitle="C#" %} + +cp /usr/lib/x86_64-linux-gnu/liblept.so /home/syncfusion/linuxdockersample/linuxdockersample/bin/Debug/net7.0/liblept1753.so + +{% endhighlight %} + +{% highlight c# tabtitle="C#" %} + +cp /usr/lib/x86_64-linux-gnu/libtesseract.so.4 /home/syncfusion/linuxdockersample/linuxdockersample/bin/Debug/net7.0/libSyncfusionTesseract.so + +{% endhighlight %} + + |
+