From 7769c1fd6c63d5b0b9bed5e0271ec1be8fdc7f66 Mon Sep 17 00:00:00 2001 From: RISHAV KUMAR <57145318+hr1shu@users.noreply.github.com> Date: Sun, 4 Oct 2020 14:00:11 +0530 Subject: [PATCH] Add files via upload --- pdfExtract.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pdfExtract.py diff --git a/pdfExtract.py b/pdfExtract.py new file mode 100644 index 0000000..1d21b73 --- /dev/null +++ b/pdfExtract.py @@ -0,0 +1,9 @@ +import PyPDF2 +a = PyPDF2.PdfFileReader('TIKTOK.pdf') + +str = "" +for i in range(1,11): + str += a.getPage(i).extractText() + +with open("text.txt", "w", encoding = 'utf-8') as f: + f.write(str)