From 672707d36994271d5b48c9574e9507e11791f8f9 Mon Sep 17 00:00:00 2001 From: BIT074 Date: Thu, 3 Sep 2026 10:28:29 +0800 Subject: [PATCH] doc: add doc.close() to the basic example for consistency --- docs/the-basics.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/the-basics.rst b/docs/the-basics.rst index 1e1ecca71..5049855ae 100644 --- a/docs/the-basics.rst +++ b/docs/the-basics.rst @@ -50,6 +50,7 @@ To extract all the text from a |PDF| file, do the following: out.write(text) # write text of page out.write(bytes((12,))) # write page delimiter (form feed 0x0C) out.close() + doc.close() Of course it is not just |PDF| which can have text extracted - all the :ref:`supported document file formats ` such as :title:`MOBI`, :title:`EPUB`, :title:`TXT` can have their text extracted.