Skip to content

Commit e43994b

Browse files
authored
Add PDF save instructions to docs
[skip ci]
1 parent e28b680 commit e43994b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.rst

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ USAGE
8181
8282
# Get a searchable PDF
8383
pdf = pytesseract.image_to_pdf_or_hocr('test.png', extension='pdf')
84+
with open('test.pdf', 'w+b') as f:
85+
f.write(pdf) # pdf type is bytes by default
8486
8587
# Get HOCR output
8688
hocr = pytesseract.image_to_pdf_or_hocr('test.png', extension='hocr')

0 commit comments

Comments
 (0)