We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93fd442 commit c7939e1Copy full SHA for c7939e1
PDF2Text/script.py
@@ -1,14 +1,13 @@
1
import PyPDF2
2
3
-pdf = input("Enter the path of PDF file")
4
-n = int(input("Enter number of pages"))
+pdf = input(r"Enter the path of PDF file: ")
+n = int(input("Enter number of pages: "))
5
st=""
6
page = PyPDF2.PdfFileReader(pdf)
7
-for i in range(1,n+1):
+for i in range(n):
8
9
st += page.getPage(i).extractText()
10
11
with open('./PDF2Text/pages/text.txt','w') as f:
12
f.write(st)
13
14
-
0 commit comments