File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed
Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ # <b >PDF2Text</b >
2+
3+ [ ![ forthebadge] ( https://forthebadge.com/images/badges/made-with-python.svg )] ( https://forthebadge.com )
4+
5+ ## PDF2Text Functionalities : 🚀
6+
7+ - Converts PDF file to a text file
8+
9+ ## PDF2Text Instructions: 👨🏻💻
10+
11+ ### Step 1:
12+
13+ Open Termnial 💻
14+
15+ ### Step 2:
16+
17+ Locate to the directory where python file is located 📂
18+
19+ ### Step 3:
20+
21+ Run the command: python script.py/python3 script.py 🧐
22+
23+ ### Step 4:
24+
25+ Sit back and Relax. Let the Script do the Job. ☕
26+
27+ ### Requirements
28+
29+ - PyPDF2
30+
31+ ## Author
32+
33+ Amit Kumar Mishra
34+
Original file line number Diff line number Diff line change 1+ import PyPDF2
2+
3+ pdf = input ("Enter the path of PDF file" )
4+ n = int (input ("Enter number of pages" ))
5+ st = ""
6+ page = PyPDF2 .PdfFileReader (pdf )
7+ for i in range (1 ,n + 1 ):
8+
9+ st += page .getPage (i ).extractText ()
10+
11+ with open ('./PDF2Text/pages/text.txt' ,'w' ) as f :
12+ f .write (st )
13+
14+
You can’t perform that action at this time.
0 commit comments