Skip to content

Commit dcdc9d2

Browse files
authored
Documentation refactoring
1 parent a50fbea commit dcdc9d2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ USAGE
5555
# Get information about orientation and script detection
5656
print(pytesseract.image_to_osd(Image.open('test.png')))
5757
58-
# In order to bypass the internal image conversions, just use relative or absolute image path
59-
# NOTE: If you don't use supported images, tesseract will return error
58+
# In order to bypass the image conversions of pytesseract, just use relative or absolute image path
59+
# NOTE: In this case you should provide tesseract supported images or tesseract will return error
6060
print(pytesseract.image_to_string('test.png'))
6161
62-
# get a searchable PDF
62+
# Get a searchable PDF
6363
pdf = pytesseract.image_to_pdf_or_hocr('test.png', extension='pdf')
6464
65-
# get HOCR output
65+
# Get HOCR output
6666
hocr = pytesseract.image_to_pdf_or_hocr('test.png', extension='hocr')
6767
6868
Support for OpenCV image/NumPy array objects
@@ -80,13 +80,11 @@ Add the following config, if you have tessdata error like: "Error opening data f
8080
8181
.. code-block:: python
8282
83-
tessdata_dir_config = r'--tessdata-dir "<replace_with_your_tessdata_dir_path>"'
8483
# Example config: r'--tessdata-dir "C:\Program Files (x86)\Tesseract-OCR\tessdata"'
8584
# It's important to add double quotes around the dir path.
86-
85+
tessdata_dir_config = r'--tessdata-dir "<replace_with_your_tessdata_dir_path>"'
8786
pytesseract.image_to_string(image, lang='chi_sim', config=tessdata_dir_config)
8887
89-
9088
**Functions**
9189
9290
* **get_tesseract_version** Returns the Tesseract version installed in the system.

0 commit comments

Comments
 (0)