Skip to content

Commit 1260050

Browse files
dyp1109jamie-lemon
authored andcommitted
doc: add doc.close() to the basic example for consistency
1 parent 1b4300e commit 1260050

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎docs/the-basics.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ To extract all the text from a |PDF| file, do the following:
5050
out.write(text) # write text of page
5151
out.write(bytes((12,))) # write page delimiter (form feed 0x0C)
5252
out.close()
53+
doc.close()
5354
5455
Of course it is not just |PDF| which can have text extracted - all the :ref:`supported document file formats <About_Feature_Matrix>` such as :title:`MOBI`, :title:`EPUB`, :title:`TXT` can have their text extracted.
5556

0 commit comments

Comments
 (0)