pdf to text using python
by specter - Wednesday June 21, 2023 at 04:39 AM
#1
import os
import pdftotext


pdf_path = input("Enter the path of the pdf file : ")

assert os.path.exists(pdf_path), "this pdf file doesn't exist"

with open(pdf_path, 'rb') as f_r:
    pdf_pages = pdftotext.PDF(f_r)

for i, page in enumerate(pdf_pages):
    print('Page {}'.format(i))
    print(page)
    print('*'*100)
Reply
#2
Oh man!! Python is such an amazing programming language
Reply
#3
Thanks
Reply
#4
Thanks man!

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Suspected Scamming | Contact us via http://breachqr3dqbysbq5khaadg5ynnpxn2wrmw5y3rnzesun55l6lkq73yd.onion/misc.php?action=help&hid=27 if you feel this is incorrect.
Reply
#5
Thats very cool share

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Selling public data.
Reply
#6
there are many modules to do this, will definitely try this too
Reply
#7
Thanks man
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to have CHATGPT PERPLEXITY and OTHERS for FREE2. Amsterdamer 36 3,441 4 hours ago
Last Post: arhmel0
  Discord Token Grabber | Private Stealer | Leaked For Free Piplup 359 59,643 4 hours ago
Last Post: kidspam
  How to catch a pedophile slxppv 288 36,232 Today, 08:13 AM
Last Post: ilya313
  How to build GTA V from source depodaapre 102 15,157 Today, 03:25 AM
Last Post: pihuit38293
  (E-Book) OSINT Techniques | How To Uncover Information Online Chapo 58 5,495 Yesterday, 08:20 AM
Last Post: demmama

Forum Jump:


 Users browsing this forum: 1 Guest(s)